6#include <qpa/qplatformsessionmanager.h>
7#include <qpa/qplatformintegration.h>
9#include <private/qobject_p.h>
10#include <private/qguiapplication_p.h>
11#include <private/qsessionmanager_p.h>
13#ifndef QT_NO_SESSIONMANAGER
93 "No platform session management, should use the default implementation");
107QSessionManager::~QSessionManager()
122 return d->platformSessionManager->sessionId();
140 return d->platformSessionManager->sessionKey();
176 return d->platformSessionManager->allowsInteraction();
193 return d->platformSessionManager->allowsErrorInteraction();
205 d->platformSessionManager->release();
217 d->platformSessionManager->cancel();
237 d->platformSessionManager->setRestartHint(
hint);
251 return d->platformSessionManager->restartHint();
278 d->platformSessionManager->setRestartCommand(command);
293 return d->platformSessionManager->restartCommand();
304 d->platformSessionManager->setDiscardCommand(command);
319 return d->platformSessionManager->discardCommand();
334 d->platformSessionManager->setManagerProperty(
name,
value);
347 d->platformSessionManager->setManagerProperty(
name,
value);
359 return d->platformSessionManager->isPhase2();
382 d->platformSessionManager->requestPhase2();
387#include "moc_qsessionmanager.cpp"
static QPlatformIntegration * platformIntegration()
QSessionManagerPrivate(const QString &id, const QString &key)
~QSessionManagerPrivate()
QPlatformSessionManager * platformSessionManager
The QSessionManager class provides access to the session manager.
QStringList discardCommand() const
Returns the currently set discard command.
QString sessionKey() const
Returns the session key in the current session.
bool allowsInteraction()
Asks the session manager for permission to interact with the user.
void cancel()
Tells the session manager to cancel the shutdown process.
QString sessionId() const
Returns the identifier of the current session.
RestartHint restartHint() const
Returns the application's current restart hint.
RestartHint
This enum type defines the circumstances under which this application wants to be restarted by the se...
void release()
Releases the session manager's interaction semaphore after an interaction phase.
void requestPhase2()
Requests a second session management phase for the application.
bool allowsErrorInteraction()
Returns true if error interaction is permitted; otherwise returns false.
void setRestartHint(RestartHint)
Sets the application's restart hint to hint.
bool isPhase2() const
Returns true if the session manager is currently performing a second session management phase; otherw...
void setDiscardCommand(const QStringList &)
Sets the discard command to the given command.
void setRestartCommand(const QStringList &)
If the session manager is capable of restoring sessions it will execute command in order to restore t...
void setManagerProperty(const QString &name, const QString &value)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QStringList restartCommand() const
Returns the currently set restart command.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
@ AA_DisableSessionManager
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_ASSERT_X(cond, x, msg)
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
QApplication app(argc, argv)
[0]