diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-02-11 13:00:59 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-14 00:34:25 +0100 |
commit | 9835a63dde06a1e5d2f0452d50da86aa6790e4f7 (patch) | |
tree | 877a77c94daf2844c04e140376b0ef415cd35ae7 /src/gui/kernel/qguiapplication_p.h | |
parent | ff11af4fbc2948a3a3bc635549c7ac349d249abc (diff) |
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 <david.faure@kdab.com>
Diffstat (limited to 'src/gui/kernel/qguiapplication_p.h')
-rw-r--r-- | src/gui/kernel/qguiapplication_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 |