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:
Daniel Teske
2012-02-10 12:55:15 +01:00
parent aa7efa417d
commit 854fbd1e41
3 changed files with 17 additions and 31 deletions

View File

@@ -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