summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2014-03-18 11:30:05 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-20 08:35:24 +0100
commit669588484fe4ee4ab1fddf39887d684d563b7450 (patch)
tree67fe3fe02e859864e02289289117fda6d89097e8
parenta466743f744e41bfdf0f7333b452a02ecc31dbbb (diff)
Cocoa: Close windows with QWSI::handleCloseEvent()
Calling QWindow::close() directly bypasses some of the window close logic in the QWindow subclasses. Change-Id: I208db5600e6a756e25e207eaaf55dcfad255f406 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index 327ca00ad6..f8411845dc 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -223,8 +223,9 @@ static void cleanupCocoaApplicationDelegate()
// events while the event loop is still running.
const QWindowList topLevels = QGuiApplication::topLevelWindows();
for (int i = 0; i < topLevels.size(); ++i) {
- topLevels.at(i)->close();
+ QWindowSystemInterface::handleCloseEvent(topLevels.at(i));
}
+ QWindowSystemInterface::flushWindowSystemEvents();
QGuiApplication::exit(0);
startedQuit = false;