diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2013-06-18 14:42:43 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-19 12:16:03 +0200 |
commit | 249c5f0689bf1208a4f1d589de45c20c3ff16de9 (patch) | |
tree | ee75b8c09e5e568b08c4b5ba67a7601a0968396d /src/widgets | |
parent | 2a8efea1a90436556f1cd471dce27a0619c5618e (diff) |
If a QWidget is ignored for auto-quit, ignore its corresponding QWindow.
Unit test by Friedemann Kleint <Friedemann.Kleint@digia.com>
Task-number: QTBUG-31569
Change-Id: I526d33d4f88a41f6ac349098476bc45af6c841b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 6921b4b462..080f4358f2 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -2695,12 +2695,14 @@ bool QApplicationPrivate::shouldQuit() the ones without QuitOnClose), we emit the lastWindowClosed signal */ QWidgetList list = QApplication::topLevelWidgets(); + QWindowList processedWindows; for (int i = 0; i < list.size(); ++i) { QWidget *w = list.at(i); + processedWindows.push_back(w->windowHandle()); if (w->isVisible() && !w->parentWidget() && w->testAttribute(Qt::WA_QuitOnClose)) return false; } - return QGuiApplicationPrivate::shouldQuit(); + return QGuiApplicationPrivate::shouldQuitInternal(processedWindows); } static inline void closeAllPopups() |