From c5665a182db5002afe6dc7c69f343e89de5fca31 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 14 May 2012 16:58:26 +0200 Subject: Only quit if there are no visible widgets or windows. We need to let the QGuiApplication determine whether quitting is appropriate based on whether there are visible top level QWindows after the last top-level QWidget was closed. This solves the issue raised here: http://thread.gmane.org/gmane.comp.lib.qt.user/1880 The transientParent is the QWindow equivalent of parentWidget on QWidget, so the test in QGuiApplication::shouldQuit is similar to the one in QApplication::shouldQuit. Change-Id: I500eff8d5887f24415180134b3a4be3c630a896f Reviewed-by: Bradley T. Hughes --- src/widgets/kernel/qapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/kernel') diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index e9003e8c14..0553dabe51 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -2950,7 +2950,7 @@ bool QApplicationPrivate::shouldQuit() if (w->isVisible() && !w->parentWidget() && w->testAttribute(Qt::WA_QuitOnClose)) return false; } - return true; + return QGuiApplicationPrivate::shouldQuit(); } /*! \reimp -- cgit v1.2.3