summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-06-09 00:34:04 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-06-09 00:34:04 (GMT)
commitb8c8c87587bcc0312f0efbb2028885adb8419fee (patch)
tree4857b4ff79acb48953c9a2a7c3a62c6dfeafdda3 /src/gui/kernel/qwidget.cpp
parent9410eb0630e0f3b80ffd335002efbd7ce532e826 (diff)
parent70283a0a87e46a8aa9d2e6296f4ed7c93cc230d6 (diff)
downloadQt-b8c8c87587bcc0312f0efbb2028885adb8419fee.zip
Qt-b8c8c87587bcc0312f0efbb2028885adb8419fee.tar.gz
Qt-b8c8c87587bcc0312f0efbb2028885adb8419fee.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts: configure.exe tools/qdoc3/htmlgenerator.cpp tools/qdoc3/tree.cpp
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index d03d2df..71c2f2b 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -5674,15 +5674,10 @@ void QWidget::setFocus(Qt::FocusReason reason)
w = w->isWindow() ? 0 : w->parentWidget();
}
} else {
- while (w && w->isVisible()) {
+ while (w) {
w->d_func()->focus_child = f;
w = w->isWindow() ? 0 : w->parentWidget();
}
- // a special case, if there is an invisible parent, notify him
- // about the focus_child widget, so that if it becomes
- // visible, the focus widget will be respected.
- if (w)
- w->d_func()->focus_child = f;
}
#ifndef QT_NO_GRAPHICSVIEW
@@ -5757,8 +5752,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
@@ -6734,10 +6730,6 @@ void QWidgetPrivate::show_helper()
if (QApplicationPrivate::hidden_focus_widget == q) {
QApplicationPrivate::hidden_focus_widget = 0;
q->setFocus(Qt::OtherFocusReason);
- } else if (focus_child) {
- // if we are shown and there is an explicit focus child widget
- // set, respect it by giving him focus.
- focus_child->setFocus(Qt::OtherFocusReason);
}
// Process events when showing a Qt::SplashScreen widget before the event loop