summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-06-08 06:51:51 (GMT)
committeraxis <qt-info@nokia.com>2009-06-08 06:51:51 (GMT)
commitd4257360234a967bfbacde92ec2bb1ac8979b793 (patch)
treea907ea5fe0d3142ecefce50b79c735554efdf39b /src/gui/kernel/qwidget.cpp
parent5163d6e1a36f48bf9d8483d3ca23ec730b5188c0 (diff)
parent3b2b9d727f0fadf607968c73003e7550c8bd0296 (diff)
downloadQt-d4257360234a967bfbacde92ec2bb1ac8979b793.zip
Qt-d4257360234a967bfbacde92ec2bb1ac8979b793.tar.gz
Qt-d4257360234a967bfbacde92ec2bb1ac8979b793.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts: tests/auto/qlocalsocket/tst_qlocalsocket.cpp
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 955ac8b..b376f20 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -5825,8 +5825,9 @@ void QWidget::setFocus(Qt::FocusReason reason)
void QWidget::clearFocus()
{
QWidget *w = this;
- while (w && w->d_func()->focus_child == this) {
- w->d_func()->focus_child = 0;
+ while (w) {
+ if (w->d_func()->focus_child == this)
+ w->d_func()->focus_child = 0;
w = w->parentWidget();
}
#ifndef QT_NO_GRAPHICSVIEW