From 9835a63dde06a1e5d2f0452d50da86aa6790e4f7 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 11 Feb 2014 13:00:59 +0100 Subject: Close widgets properly from session management. Introduce new virtual QGuiApplicationPrivate::tryCloseAllWindows() which allows overriding the behavior in QApplication to properly close the widgets first. Without this, QGuiApplication closes the widget windows leaving a stale window handle behind in the associated QWidget which then causes the application not to terminate since QApplication::shouldQuit() stills finds the affected widgets to be visible. Task-number: QTBUG-35986 Change-Id: I19ac4b5a19250ee68d09e461c03dbace458c98e4 Reviewed-by: David Faure --- src/gui/kernel/qguiapplication_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index c23232182c..1ec808ec27 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -92,6 +92,7 @@ public: virtual bool shouldQuit(); bool shouldQuitInternal(const QWindowList &processedWindows); + virtual bool tryCloseAllWindows(); static Qt::KeyboardModifiers modifier_buttons; static Qt::MouseButtons mouse_buttons; @@ -291,6 +292,7 @@ public: protected: virtual void notifyThemeChanged(); + bool tryCloseRemainingWindows(QWindowList processedWindows); #ifndef QT_NO_DRAGANDDROP virtual void notifyDragStarted(const QDrag *); #endif // QT_NO_DRAGANDDROP -- cgit v1.2.3