44 #ifndef QT_NO_SESSIONMANAGER 47 #include <private/qobject_p.h> 75 d->restartHint = RestartIfRunning;
116 d->restartHint = hint;
122 return d->restartHint;
128 d->restartCommand = command;
134 return d->restartCommand;
140 d->discardCommand = command;
146 return d->discardCommand;
174 #endif // QT_NO_SESSIONMANAGER
bool allowsErrorInteraction()
Returns true if error interaction is permitted; otherwise returns false.
The QApplication class manages the GUI application's control flow and main settings.
#define QT_END_NAMESPACE
This macro expands to.
QSessionManager::RestartHint restartHint
QStringList restartCommand
QStringList restartCommand() const
Returns the currently set restart command.
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
void setDiscardCommand(const QStringList &)
Sets the discard command to the given list.
bool allowsInteraction()
Asks the session manager for permission to interact with the user.
QSessionManagerPrivate(QSessionManager *mgr, QString &id, QString &key)
void release()
Releases the session manager's interaction semaphore after an interaction phase.
void setRestartCommand(const QStringList &)
If the session manager is capable of restoring sessions it will execute command in order to restore t...
void setRestartHint(RestartHint)
Sets the application's restart hint to hint.
The QSessionManager class provides access to the session manager.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QSessionManager(QApplication *app, QString &id, QString &key)
The QStringList class provides a list of strings.
bool isPhase2() const
Returns true if the session manager is currently performing a second session management phase; otherw...
void setManagerProperty(const QString &name, const QString &value)
Low-level write access to the application's identification and state records are kept in the session ...
QStringList discardCommand() const
Returns the currently set discard command.
RestartHint
This enum type defines the circumstances under which this application wants to be restarted by the se...
QString sessionId() const
Returns the identifier of the current session.
QString sessionKey() const
Returns the session key in the current session.
RestartHint restartHint() const
Returns the application's current restart hint.
void requestPhase2()
Requests a second session management phase for the application.
QStringList discardCommand
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
void cancel()
Tells the session manager to cancel the shutdown process.