forked from qt-creator/qt-creator
Rename SessionManager::clear() to closeAllProjects()
Also move the editor closing out of the function. It isn't needed on shutdown as all editors are already closed then. Change-Id: Ie50a238e0a0382a99b0a267b286f9ed9484f26f6 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -372,31 +372,15 @@ bool SessionManager::save()
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\fn bool SessionManager::clear()
|
||||
\fn bool SessionManager::closeAllProjects()
|
||||
|
||||
Returns whether the clear operation has been not cancelled & all projects could be closed.
|
||||
Closes all projects
|
||||
*/
|
||||
bool SessionManager::clear()
|
||||
void SessionManager::closeAllProjects()
|
||||
{
|
||||
if (debug)
|
||||
qDebug() << "SessionManager - clearing session ...";
|
||||
|
||||
bool success = ICore::editorManager()->closeAllEditors();
|
||||
|
||||
if (success) {
|
||||
if (debug)
|
||||
qDebug() << "SessionManager - Removing projects ...";
|
||||
|
||||
setStartupProject(0);
|
||||
removeProjects(projects());
|
||||
}
|
||||
|
||||
if (debug)
|
||||
qDebug() << "SessionManager - clearing session result is " << success;
|
||||
|
||||
return success;
|
||||
setStartupProject(0);
|
||||
removeProjects(projects());
|
||||
}
|
||||
|
||||
const QList<Project *> &SessionManager::projects() const
|
||||
|
||||
Reference in New Issue
Block a user