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>
bb10
Morten Johan Sørvig 2014-03-18 11:30:05 +01:00 committed by The Qt Project
parent a466743f74
commit 669588484f
1 changed files with 2 additions and 1 deletions

View File

@ -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;