diff options
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm index cac50825af..caa8884661 100644 --- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm @@ -221,12 +221,8 @@ QT_END_NAMESPACE const QWindowList topLevels = QGuiApplication::topLevelWindows(); for (int i = 0; i < topLevels.size(); ++i) { QWindow *topLevelWindow = topLevels.at(i); - // Widgets have alreay received a CloseEvent from the QApplication - // QCloseEvent handler. (see canQuit above). Prevent running the - // CloseEvent logic twice, call close() directly. - if (topLevelWindow->inherits("QWidgetWindow")) - topLevelWindow->close(); - else + // Already closed windows will not have a platform window, skip those + if (topLevelWindow->handle()) QWindowSystemInterface::handleCloseEvent(topLevelWindow); } QWindowSystemInterface::flushWindowSystemEvents(); |