diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-08-19 09:52:55 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-08-19 09:52:55 (GMT) |
commit | 872ccdcc090cec252cea2109d2fc9f2f2ee4c795 (patch) | |
tree | 7b14b977528cb6e833a765afce3c9bf6e55c94af /src/gui/kernel/qapplication.cpp | |
parent | 74d519f87e804b624ac76337fe2905d512d363fc (diff) | |
parent | f6cfafde26b4735965be8df0d11e9d7c297c75b9 (diff) | |
download | Qt-872ccdcc090cec252cea2109d2fc9f2f2ee4c795.zip Qt-872ccdcc090cec252cea2109d2fc9f2f2ee4c795.tar.gz Qt-872ccdcc090cec252cea2109d2fc9f2f2ee4c795.tar.bz2 |
Merge remote branch 'qt/4.7' into lighthouse-4.7
Conflicts:
src/opengl/qgl_p.h
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 08852af..b5af8b6 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -477,7 +477,7 @@ int qt_antialiasing_threshold = -1; static int drag_time = 500; #ifdef Q_OS_SYMBIAN // The screens are a bit too small to for your thumb when using only 4 pixels drag distance. -static int drag_distance = 8; +static int drag_distance = 12; #else static int drag_distance = 4; #endif @@ -1060,6 +1060,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; @@ -1080,18 +1092,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; @@ -2549,6 +2549,13 @@ void QApplication::setActiveWindow(QWidget* act) sendSpontaneousEvent(w, &activationChange); } +#ifdef QT_MAC_USE_COCOA + // In case the user clicked on a child window, we need to + // reestablish the stacking order of the window so + // it pops in front of other child windows in cocoa: + qt_cocoaStackChildWindowOnTopOfOtherChildren(window); +#endif + for(int i = 0; i < toBeDeactivated.size(); ++i) { QWidget *w = toBeDeactivated.at(i); sendSpontaneousEvent(w, &windowDeactivate); |