forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user