summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/session.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/projectexplorer/session.cpp')
-rw-r--r--src/plugins/projectexplorer/session.cpp31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp
index c235a2116f..7c96b0f482 100644
--- a/src/plugins/projectexplorer/session.cpp
+++ b/src/plugins/projectexplorer/session.cpp
@@ -305,7 +305,16 @@ void SessionFile::clearFailedProjectFileNames()
m_failedProjects.clear();
}
-/* --------------------------------- */
+/*!
+ \class ProjectExplorer::SessionManager
+
+ \brief Session management.
+
+ TODO the interface of this class is not really great.
+ The implementation suffers that all the functions from the
+ public interface just wrap around functions which do the actual work
+ This could be improved.
+*/
SessionManager::SessionManager(QObject *parent)
: QObject(parent),
@@ -917,6 +926,10 @@ void SessionManager::removeProjects(QList<Project *> remove)
setStartupProject(m_file->m_projects.first());
}
+/*!
+ \brief Let other plugins store persistent values within the session file.
+*/
+
void SessionManager::setValue(const QString &name, const QVariant &value)
{
if (!m_file)
@@ -961,6 +974,10 @@ QString SessionManager::sessionNameToFileName(const QString &session) const
return m_core->userResourcePath() + '/' + session + ".qws";
}
+/*!
+ \brief Creates a new default session and switches to it.
+*/
+
void SessionManager::createAndLoadNewDefaultSession()
{
emit aboutToLoadSession();
@@ -969,6 +986,10 @@ void SessionManager::createAndLoadNewDefaultSession()
emit sessionLoaded();
}
+/*!
+ \brief Just creates a new session (Does not actually create the file).
+*/
+
bool SessionManager::createSession(const QString &session)
{
if (sessions().contains(session))
@@ -987,6 +1008,10 @@ bool SessionManager::renameSession(const QString &original, const QString &newNa
return deleteSession(original);
}
+/*!
+ \brief Deletes session name from session list and file from disk.
+*/
+
bool SessionManager::deleteSession(const QString &session)
{
if (!m_sessions.contains(session))
@@ -1013,6 +1038,10 @@ bool SessionManager::cloneSession(const QString &original, const QString &clone)
return false;
}
+/*!
+ \brief Loads a session, takes a session name (not filename).
+*/
+
bool SessionManager::loadSession(const QString &session)
{
// Do nothing if we have that session already loaded,