diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-08-19 10:43:58 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-08-19 10:43:58 (GMT) |
commit | 0e451e855e54f6827e11f7664450aaf0be208203 (patch) | |
tree | 26ceb00aa948c1cbd8103a825fc5582d6a1bd719 /src/gui/kernel/qapplication.cpp | |
parent | a226143eeda6771efc4f0df6955351336735cb60 (diff) | |
parent | 872ccdcc090cec252cea2109d2fc9f2f2ee4c795 (diff) | |
download | Qt-0e451e855e54f6827e11f7664450aaf0be208203.zip Qt-0e451e855e54f6827e11f7664450aaf0be208203.tar.gz Qt-0e451e855e54f6827e11f7664450aaf0be208203.tar.bz2 |
Merge remote branch 'lighthouse/4.7' into lighthouse-master
Conflicts:
src/plugins/bearer/connman/qconnmanservice_linux.cpp
tests/auto/qpainter/tst_qpainter.cpp
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index f7907d6..951f9ea 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -1058,6 +1058,18 @@ QApplication::~QApplication() QApplicationPrivate::is_app_closing = true; QApplicationPrivate::is_app_running = false; + // delete all widgets + if (QWidgetPrivate::allWidgets) { + QWidgetSet *mySet = QWidgetPrivate::allWidgets; + QWidgetPrivate::allWidgets = 0; + for (QWidgetSet::ConstIterator it = mySet->constBegin(); it != mySet->constEnd(); ++it) { + register QWidget *w = *it; + if (!w->parent()) // window + w->destroy(true, true); + } + delete mySet; + } + delete qt_desktopWidget; qt_desktopWidget = 0; @@ -1078,18 +1090,6 @@ QApplication::~QApplication() delete QWidgetPrivate::mapper; QWidgetPrivate::mapper = 0; - // delete all widgets - if (QWidgetPrivate::allWidgets) { - QWidgetSet *mySet = QWidgetPrivate::allWidgets; - QWidgetPrivate::allWidgets = 0; - for (QWidgetSet::ConstIterator it = mySet->constBegin(); it != mySet->constEnd(); ++it) { - register QWidget *w = *it; - if (!w->parent()) // window - w->destroy(true, true); - } - delete mySet; - } - delete QApplicationPrivate::app_pal; QApplicationPrivate::app_pal = 0; delete QApplicationPrivate::sys_pal; |