diff options
author | David Reveman <davidr@novell.com> | 2007-07-05 17:09:51 -0400 |
---|---|---|
committer | David Reveman <davidr@novell.com> | 2007-07-05 17:09:51 -0400 |
commit | 68ac73cbce5ca098431a9020b2183bbf97288ae5 (patch) | |
tree | 403194447fba71ef1e4c0fcfec90baa27878c5ec /kde/window-decorator | |
parent | afb884d73acacbac3322a134ee5b294109f7af50 (diff) |
Remove unnecessary NULL check.
Diffstat (limited to 'kde/window-decorator')
-rw-r--r-- | kde/window-decorator/window.cpp | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/kde/window-decorator/window.cpp b/kde/window-decorator/window.cpp index 6b4b6031..69d23ad3 100644 --- a/kde/window-decorator/window.cpp +++ b/kde/window-decorator/window.cpp @@ -1377,36 +1377,32 @@ KWD::Window::updateProperty (void) if (mType == Normal || mType == Switcher) { - int topXOffset = w / 2; + int topXOffset = w / 2; + QWidget *widget = mDecor->widget (); + int x; - if (mDecor) - { - QWidget *widget = mDecor->widget (); - int x; + x = w - mContext.left_space - mContext.left_corner_space; + if (x > topXOffset) + topXOffset = x; - x = w - mContext.left_space - mContext.left_corner_space; - if (x > topXOffset) - topXOffset = x; + if (widget) + { + const QObjectList *children = widget->children (); - if (widget) + if (children) { - const QObjectList *children = widget->children (); + QWidget *child; - if (children) + for (QObjectListIt it(*children); it.current (); ++it) { - QWidget *child; - - for (QObjectListIt it(*children); it.current (); ++it) - { - if (!it.current ()->isWidgetType ()) - continue; + if (!it.current ()->isWidgetType ()) + continue; - child = static_cast <QWidget *> (it.current ()); + child = static_cast <QWidget *> (it.current ()); - x = child->x () - mBorder.left - 2; - if (x > w / 2 && x < topXOffset) - topXOffset = x; - } + x = child->x () - mBorder.left - 2; + if (x > w / 2 && x < topXOffset) + topXOffset = x; } } } |