summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2012-01-04 16:58:36 (GMT)
committerQt Commercial Integration <QtCommercial@digia.com>2012-01-31 10:25:11 (GMT)
commitf26e9750d7dd03b445389063b4fd417a7a32684d (patch)
tree590875dc80ee9fc5f1eb4a3b208ce6d443a236f7
parent1881310876d62fa12a1724a12b70f30ccd9633bb (diff)
downloadQt-f26e9750d7dd03b445389063b4fd417a7a32684d.zip
Qt-f26e9750d7dd03b445389063b4fd417a7a32684d.tar.gz
Qt-f26e9750d7dd03b445389063b4fd417a7a32684d.tar.bz2
Don't get stuck in a loop while trying to close the active popup widget
When the application is deactivated then it will try to close down the active popup widget. However, the popup widget can prevent a close from occuring and Qt should respect this without causing problems when the application is reactivated later on. Task-number: QTBUG-23448-fix
-rw-r--r--src/gui/kernel/qapplication_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index 890d527..eadf367 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -3118,7 +3118,7 @@ void onApplicationChangedActivation( bool activated )
QMenuBar::macUpdateMenuBar();
} else { // de-activated
QApplicationPrivate *priv = [[QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) sharedDelegate] qAppPrivate];
- while (priv->inPopupMode())
+ if (priv->inPopupMode())
app->activePopupWidget()->close();
if (app) {
QEvent ev(QEvent::ApplicationDeactivate);