From e7bf0edfd49de9a4d8285fbe8d878f8fda910e6d Mon Sep 17 00:00:00 2001 From: Andreas Hartmetz Date: Tue, 19 Jan 2016 14:30:18 +0100 Subject: Add option to disable "session management by closing windows". That feature is a poor man's session management for applications that do not implement any specific session management features. It badly interferes with proper session management support, so applications must be able to disable it. This enables fixing applications with QGuiApplication::quitOnLastWindowClosed() true - the default - dying too early, before they are enumerated for the list of applications to restart on session restore, thus preventing them from being restored. See https://bugs.kde.org/show_bug.cgi?id=354724 [ChangeLog][QtGui] Qt asking to close windows on session exit as a fallback session management mechanism has been made optional. Disabling it fixes session management for applications that implement full session management. See QGuiApplication::isFallbackSessionManagementEnabled(). Task-number: QTBUG-49667 Change-Id: Ib22e58c9c64351dea8b7e2a74db91d26dd7ab7aa Reviewed-by: Oswald Buddenhagen Reviewed-by: David Faure --- src/gui/kernel/qguiapplication_p.h | 1 + 1 file changed, 1 insertion(+) (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 7c7da9790b..4f0f6fdc44 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -234,6 +234,7 @@ public: #endif #ifndef QT_NO_SESSIONMANAGER + static bool is_fallback_session_management_enabled; QSessionManager *session_manager; bool is_session_restored; bool is_saving_session; -- cgit v1.2.3