From eca4936ea213536966738d6fd4e076b493afa5b4 Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 23 Nov 2012 15:29:03 +0100 Subject: Move session management code from QApplication to QGuiApplication. QSessionManager was already in QtGui, but not usable since the only API to get to it was still in QtWidgets. Session management isn't related to widgets, it also applies to QML apps on the desktop. The virtual commitData and saveState methods have been removed, given the two signals which exist since 4.2, and an additional isSessionSaving() method was added instead. Change-Id: I8099e70df133303e74456706827da21f013fcc6a Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll --- src/gui/kernel/qguiapplication_p.h | 10 ++++++++++ 1 file changed, 10 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 9044d40ab0..9c167cd099 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -228,6 +228,16 @@ public: QShortcutMap shortcutMap; #endif +#ifndef QT_NO_SESSIONMANAGER + QSessionManager *session_manager; + QString session_id; + QString session_key; + bool is_session_restored; + bool is_saving_session; + void commitData(QSessionManager& sm); + void saveState(QSessionManager& sm); +#endif + struct ActiveTouchPointsKey { ActiveTouchPointsKey(QTouchDevice *dev, int id) : device(dev), touchPointId(id) { } QTouchDevice *device; -- cgit v1.2.3