SessionManager: Inline and remove updateName

It's only ever called two times and makes it easier to understand how
m_sesionName is changed

Change-Id: I0106516b78481181d7a027a6348eee45e0e462d6
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Daniel Teske
2012-02-02 17:34:55 +01:00
parent b7a76cd7a8
commit da34e80ede
2 changed files with 4 additions and 11 deletions

View File

@@ -557,7 +557,8 @@ bool SessionManager::createImpl(const QString &fileName)
m_file = new SessionFile;
const QString &sessionName = sessionNameFromFileName(fileName);
emit aboutToLoadSession(sessionName);
updateName(sessionName);
m_sessionName = sessionName;
updateWindowTitle();
m_file->setFileName(fileName);
setStartupProject(0);
@@ -602,7 +603,8 @@ bool SessionManager::loadImpl(const QString &fileName)
m_file = new SessionFile;
const QString &sessionName = sessionNameFromFileName(fileName);
emit aboutToLoadSession(sessionName);
updateName(sessionName);
m_sessionName = sessionName;
updateWindowTitle();
if (!m_file->load(fileName)) {
QMessageBox::warning(0, tr("Error while restoring session"),
tr("Could not restore session %1").arg(fileName));
@@ -865,13 +867,6 @@ void SessionManager::updateWindowTitle()
}
}
void SessionManager::updateName(const QString &session)
{
m_sessionName = session;
updateWindowTitle();
}
void SessionManager::removeProjects(QList<Project *> remove)
{
QMap<QString, QStringList> resMap;