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/widgets/kernel/qapplication_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/widgets/kernel/qapplication_p.h')
-rw-r--r-- | src/widgets/kernel/qapplication_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h index 68ddc13362..93c9ffe002 100644 --- a/src/widgets/kernel/qapplication_p.h +++ b/src/widgets/kernel/qapplication_p.h @@ -120,6 +120,7 @@ public: virtual void notifyActiveWindowChange(QWindow *); virtual bool shouldQuit(); + bool tryCloseAllWindows() Q_DECL_OVERRIDE; #if defined(Q_WS_X11) #ifndef QT_NO_SETTINGS @@ -294,6 +295,7 @@ public: QPixmap applyQIconStyleHelper(QIcon::Mode mode, const QPixmap& base) const; private: static QApplicationPrivate *self; + static bool tryCloseAllWidgetWindows(QWindowList *processedWindows); static void giveFocusAccordingToFocusPolicy(QWidget *w, QEvent *event, QPoint localPos); static bool shouldSetFocus(QWidget *w, Qt::FocusPolicy policy); |