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

Session: Fix saving session data on shutdown from project mode

This was broken in d52ee686

.

Task-number: QTCREATORBUG-13098
Change-Id: Ia075e13fdd00e561b78058a3cab0cb02d2eb5fe6
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent bf5f14a4
......@@ -320,7 +320,7 @@ bool ModeManager::isModeSelectorVisible()
return d->m_modeSelectorVisible;
}
QObject *ModeManager::instance()
ModeManager *ModeManager::instance()
{
return m_instance;
}
......
......@@ -52,7 +52,7 @@ class CORE_EXPORT ModeManager : public QObject
Q_OBJECT
public:
static QObject *instance();
static ModeManager *instance();
static IMode *currentMode();
static IMode *mode(Id id);
......
......@@ -1277,6 +1277,8 @@ void ProjectExplorerPlugin::updateRunWithoutDeployMenu()
ExtensionSystem::IPlugin::ShutdownFlag ProjectExplorerPlugin::aboutToShutdown()
{
disconnect(ModeManager::instance(), &ModeManager::currentModeChanged,
this, &ProjectExplorerPlugin::currentModeChanged);
d->m_proWindow->aboutToShutdown(); // disconnect from session
SessionManager::closeAllProjects();
d->m_projectsMode = 0;
......@@ -1673,9 +1675,8 @@ void ProjectExplorerPlugin::restoreSession()
SessionManager::loadSession(d->m_sessionToRestoreAtStartup);
// update welcome page
connect(ModeManager::instance(),
SIGNAL(currentModeChanged(Core::IMode*,Core::IMode*)),
SLOT(currentModeChanged(Core::IMode*,Core::IMode*)));
connect(ModeManager::instance(), &ModeManager::currentModeChanged,
this, &ProjectExplorerPlugin::currentModeChanged);
#if HAS_WELCOME_PAGE
connect(d->m_welcomePage, SIGNAL(requestSession(QString)), this, SLOT(loadSession(QString)));
connect(d->m_welcomePage, SIGNAL(requestProject(QString)), this, SLOT(openProjectWelcomePage(QString)));
......
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