Commit 9901dbd1 authored by dt's avatar dt
Browse files

SessionManager: emit sessionLoaded after actually changing activeSession

Also make use of that signal for the welcome page
Task-Nr: QTCREATORBUG-4034
parent 617871c3
...@@ -331,6 +331,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -331,6 +331,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
this, SLOT(updateActions())); this, SLOT(updateActions()));
connect(d->m_session, SIGNAL(sessionLoaded()), connect(d->m_session, SIGNAL(sessionLoaded()),
this, SLOT(updateActions())); this, SLOT(updateActions()));
connect(d->m_session, SIGNAL(sessionLoaded()),
this, SLOT(updateWelcomePage()));
d->m_proWindow = new ProjectWindow; d->m_proWindow = new ProjectWindow;
......
...@@ -215,6 +215,7 @@ private slots: ...@@ -215,6 +215,7 @@ private slots:
void updateVariable(const QString &variable); void updateVariable(const QString &variable);
void publishProject(); void publishProject();
void updateWelcomePage();
#ifdef WITH_TESTS #ifdef WITH_TESTS
void testGccOutputParsers_data(); void testGccOutputParsers_data();
...@@ -252,7 +253,6 @@ private: ...@@ -252,7 +253,6 @@ private:
IRunControlFactory *findRunControlFactory(RunConfiguration *config, const QString &mode); IRunControlFactory *findRunControlFactory(RunConfiguration *config, const QString &mode);
void addToRecentProjects(const QString &fileName, const QString &displayName); void addToRecentProjects(const QString &fileName, const QString &displayName);
void updateWelcomePage();
static ProjectExplorerPlugin *m_instance; static ProjectExplorerPlugin *m_instance;
ProjectExplorerPluginPrivate *d; ProjectExplorerPluginPrivate *d;
......
...@@ -627,9 +627,6 @@ bool SessionManager::loadImpl(const QString &fileName) ...@@ -627,9 +627,6 @@ bool SessionManager::loadImpl(const QString &fileName)
if (debug) if (debug)
qDebug() << "SessionManager - restoring session returned " << success; qDebug() << "SessionManager - restoring session returned " << success;
if (success)
emit sessionLoaded();
return success; return success;
} }
...@@ -1031,6 +1028,7 @@ bool SessionManager::loadSession(const QString &session) ...@@ -1031,6 +1028,7 @@ bool SessionManager::loadSession(const QString &session)
if (QFileInfo(fileName).exists()) { if (QFileInfo(fileName).exists()) {
if (loadImpl(fileName)) { if (loadImpl(fileName)) {
updateName(session); updateName(session);
emit sessionLoaded();
return true; return true;
} }
} else { } else {
...@@ -1038,6 +1036,7 @@ bool SessionManager::loadSession(const QString &session) ...@@ -1038,6 +1036,7 @@ bool SessionManager::loadSession(const QString &session)
if (!createImpl(sessionNameToFileName(session))) if (!createImpl(sessionNameToFileName(session)))
return false; return false;
updateName(session); updateName(session);
emit sessionLoaded();
return true; return true;
} }
return false; return false;
......
Markdown is supported
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