summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2010-03-03 12:51:35 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2010-03-03 12:51:35 (GMT)
commit66586707ae875bd1caa802fd7ca88a29727396e5 (patch)
tree848e559362c752dcbe6195aba6ca1a267650d9b1 /src/gui/kernel
parent3335721dcf72cda957ba0e507608d795cab3f1ab (diff)
downloadQt-66586707ae875bd1caa802fd7ca88a29727396e5.zip
Qt-66586707ae875bd1caa802fd7ca88a29727396e5.tar.gz
Qt-66586707ae875bd1caa802fd7ca88a29727396e5.tar.bz2
Stabilize QWidget
Fix for some corner cases observed on Maemo 5 Reviewed-by: Robert Griebl
Diffstat (limited to 'src/gui/kernel')
-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 b19d541..7fdee2b 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -1122,7 +1122,8 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
qFatal("QWidget: Cannot create a QWidget when no GUI is being used");
Q_ASSERT(allWidgets);
- allWidgets->insert(q);
+ if (allWidgets)
+ allWidgets->insert(q);
QWidget *desktopWidget = 0;
if (parentWidget && parentWidget->windowType() == Qt::Desktop) {
@@ -6500,7 +6501,7 @@ void QWidget::setTabOrder(QWidget* first, QWidget *second)
// QWidget *fp = first->d_func()->focus_prev;
QWidget *fn = first->d_func()->focus_next;
- if (fn == second)
+ if (fn == second || first == second)
return;
QWidget *sp = second->d_func()->focus_prev;