Commit da34e80e authored by Daniel Teske's avatar Daniel Teske
Browse files

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: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent b7a76cd7
...@@ -557,7 +557,8 @@ bool SessionManager::createImpl(const QString &fileName) ...@@ -557,7 +557,8 @@ bool SessionManager::createImpl(const QString &fileName)
m_file = new SessionFile; m_file = new SessionFile;
const QString &sessionName = sessionNameFromFileName(fileName); const QString &sessionName = sessionNameFromFileName(fileName);
emit aboutToLoadSession(sessionName); emit aboutToLoadSession(sessionName);
updateName(sessionName); m_sessionName = sessionName;
updateWindowTitle();
m_file->setFileName(fileName); m_file->setFileName(fileName);
setStartupProject(0); setStartupProject(0);
...@@ -602,7 +603,8 @@ bool SessionManager::loadImpl(const QString &fileName) ...@@ -602,7 +603,8 @@ bool SessionManager::loadImpl(const QString &fileName)
m_file = new SessionFile; m_file = new SessionFile;
const QString &sessionName = sessionNameFromFileName(fileName); const QString &sessionName = sessionNameFromFileName(fileName);
emit aboutToLoadSession(sessionName); emit aboutToLoadSession(sessionName);
updateName(sessionName); m_sessionName = sessionName;
updateWindowTitle();
if (!m_file->load(fileName)) { if (!m_file->load(fileName)) {
QMessageBox::warning(0, tr("Error while restoring session"), QMessageBox::warning(0, tr("Error while restoring session"),
tr("Could not restore session %1").arg(fileName)); tr("Could not restore session %1").arg(fileName));
...@@ -865,13 +867,6 @@ void SessionManager::updateWindowTitle() ...@@ -865,13 +867,6 @@ void SessionManager::updateWindowTitle()
} }
} }
void SessionManager::updateName(const QString &session)
{
m_sessionName = session;
updateWindowTitle();
}
void SessionManager::removeProjects(QList<Project *> remove) void SessionManager::removeProjects(QList<Project *> remove)
{ {
QMap<QString, QStringList> resMap; QMap<QString, QStringList> resMap;
......
...@@ -159,8 +159,6 @@ private: ...@@ -159,8 +159,6 @@ private:
QStringList dependencies(const QString &proName) const; QStringList dependencies(const QString &proName) const;
QStringList dependenciesOrder() const; QStringList dependenciesOrder() const;
void updateName(const QString &session);
Internal::SessionFile *m_file; Internal::SessionFile *m_file;
SessionNode *m_sessionNode; SessionNode *m_sessionNode;
QString m_sessionName; QString m_sessionName;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment