summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qsessionmanager.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-03-18 11:33:04 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-03-18 11:38:12 +0000
commit458bf6b8582bca1daa47b40a0d6b51fc015bac87 (patch)
tree6cc5cc4bbe72708039b9ee50e91e34b51284d943 /src/gui/kernel/qsessionmanager.cpp
parent55878865db64bd2fa1d7fa158c56fe460ef939eb (diff)
parent6380cc710e4fdc0299966ff817f8cb34ace7870c (diff)
Merge "Merge remote-tracking branch 'origin/5.6.0' into 5.6" into refs/staging/5.6
Diffstat (limited to 'src/gui/kernel/qsessionmanager.cpp')
-rw-r--r--src/gui/kernel/qsessionmanager.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/gui/kernel/qsessionmanager.cpp b/src/gui/kernel/qsessionmanager.cpp
index f4b56fd01b7..c6d23f163cd 100644
--- a/src/gui/kernel/qsessionmanager.cpp
+++ b/src/gui/kernel/qsessionmanager.cpp
@@ -64,22 +64,21 @@ QT_BEGIN_NAMESPACE
settings.
QSessionManager provides an interface between the application and the
- session manager so that the program can work well with the session manager.
- In Qt, session management requests for action are handled by the two
- signals QGuiApplication::commitDataRequest() and
- QGuiApplication::saveStateRequest(). Both provide a reference to a session
- manager object as argument, to allow the application to communicate with
- the session manager. The session manager can only be accessed through these
- functions.
+ platform's session manager. In Qt, session management requests for action
+ are handled by the two signals QGuiApplication::commitDataRequest() and
+ QGuiApplication::saveStateRequest(). Both provide a reference to a
+ QSessionManager object as argument. The session manager can only be
+ accessed in slots invoked by these signals.
+
+ \warning If you use QSessionManager, you should disable fallback session
+ management: QGuiApplication::setFallbackSessionManagementEnabled().
No user interaction is possible \e unless the application gets explicit
permission from the session manager. You ask for permission by calling
allowsInteraction() or, if it is really urgent, allowsErrorInteraction().
Qt does not enforce this, but the session manager may.
- You can try to abort the shutdown process by calling cancel(). The default
- commitData() function does this if some top-level window rejected its
- closeEvent().
+ You can try to abort the shutdown process by calling cancel().
For sophisticated session managers provided on Unix/X11, QSessionManager
offers further possibilities to fine-tune an application's session