SessionManager Class

class Core::SessionManager

The SessionManager class manages sessions. More...

Header: #include <SessionManager>
Inherits: QObject

Static Public Members

bool confirmSessionDelete(const QStringList &sessions)
bool createSession(const QString &session)
bool deleteSession(const QString &session)
QString lastSession()
void setValue(const QString &name, const QVariant &value)
QString startupSession()

Detailed Description

TODO the interface of this class is not really great. The implementation suffers from that all the functions from the public interface just wrap around functions which do the actual work. This could be improved.

Member Function Documentation

[static] bool SessionManager::confirmSessionDelete(const QStringList &sessions)

Shows a dialog asking the user to confirm the deletion of the specified sessions.

Returns whether the user confirmed the deletion.

[static] bool SessionManager::createSession(const QString &session)

Creates session, but does not actually create the file.

Returns whether the creation was successful.

[static] bool SessionManager::deleteSession(const QString &session)

Deletes session name from session list and the file from disk.

Returns whether the deletion was successful.

[static] QString SessionManager::lastSession()

Returns the last session that was opened by the user.

[static] void SessionManager::setValue(const QString &name, const QVariant &value)

Lets other plugins store persistent values specified by name and value within the session file.

[static] QString SessionManager::startupSession()

Returns the session that was active when Qt Creator was last closed, if any.

© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.