forked from qt-creator/qt-creator
Session: Fix saving session data on shutdown from project mode
This was broken in d52ee686d1
.
Task-number: QTCREATORBUG-13098
Change-Id: Ia075e13fdd00e561b78058a3cab0cb02d2eb5fe6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -320,7 +320,7 @@ bool ModeManager::isModeSelectorVisible()
|
|||||||
return d->m_modeSelectorVisible;
|
return d->m_modeSelectorVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
QObject *ModeManager::instance()
|
ModeManager *ModeManager::instance()
|
||||||
{
|
{
|
||||||
return m_instance;
|
return m_instance;
|
||||||
}
|
}
|
||||||
|
@@ -52,7 +52,7 @@ class CORE_EXPORT ModeManager : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static QObject *instance();
|
static ModeManager *instance();
|
||||||
|
|
||||||
static IMode *currentMode();
|
static IMode *currentMode();
|
||||||
static IMode *mode(Id id);
|
static IMode *mode(Id id);
|
||||||
|
@@ -1277,6 +1277,8 @@ void ProjectExplorerPlugin::updateRunWithoutDeployMenu()
|
|||||||
|
|
||||||
ExtensionSystem::IPlugin::ShutdownFlag ProjectExplorerPlugin::aboutToShutdown()
|
ExtensionSystem::IPlugin::ShutdownFlag ProjectExplorerPlugin::aboutToShutdown()
|
||||||
{
|
{
|
||||||
|
disconnect(ModeManager::instance(), &ModeManager::currentModeChanged,
|
||||||
|
this, &ProjectExplorerPlugin::currentModeChanged);
|
||||||
d->m_proWindow->aboutToShutdown(); // disconnect from session
|
d->m_proWindow->aboutToShutdown(); // disconnect from session
|
||||||
SessionManager::closeAllProjects();
|
SessionManager::closeAllProjects();
|
||||||
d->m_projectsMode = 0;
|
d->m_projectsMode = 0;
|
||||||
@@ -1673,9 +1675,8 @@ void ProjectExplorerPlugin::restoreSession()
|
|||||||
SessionManager::loadSession(d->m_sessionToRestoreAtStartup);
|
SessionManager::loadSession(d->m_sessionToRestoreAtStartup);
|
||||||
|
|
||||||
// update welcome page
|
// update welcome page
|
||||||
connect(ModeManager::instance(),
|
connect(ModeManager::instance(), &ModeManager::currentModeChanged,
|
||||||
SIGNAL(currentModeChanged(Core::IMode*,Core::IMode*)),
|
this, &ProjectExplorerPlugin::currentModeChanged);
|
||||||
SLOT(currentModeChanged(Core::IMode*,Core::IMode*)));
|
|
||||||
#if HAS_WELCOME_PAGE
|
#if HAS_WELCOME_PAGE
|
||||||
connect(d->m_welcomePage, SIGNAL(requestSession(QString)), this, SLOT(loadSession(QString)));
|
connect(d->m_welcomePage, SIGNAL(requestSession(QString)), this, SLOT(loadSession(QString)));
|
||||||
connect(d->m_welcomePage, SIGNAL(requestProject(QString)), this, SLOT(openProjectWelcomePage(QString)));
|
connect(d->m_welcomePage, SIGNAL(requestProject(QString)), this, SLOT(openProjectWelcomePage(QString)));
|
||||||
|
Reference in New Issue
Block a user