Commit 311bed93 authored by Eike Ziller's avatar Eike Ziller
Browse files

Fix that last session could reset to default session

E.g. when opening and closing Qt Creator without opening a session.
The last session may only be updated to the "active" session, if it is
not the default-virgin session (which is actually a "no session" value).

Change-Id: If47da30d94c20df62d45960224e3137bcc6ba1b8
Reviewed-by: default avatarhjk <>
Reviewed-by: Tobias Hunger's avatarTobias Hunger <>
parent 330d8cab
...@@ -1556,6 +1556,7 @@ void ProjectExplorerPluginPrivate::savePersistentSettings() ...@@ -1556,6 +1556,7 @@ void ProjectExplorerPluginPrivate::savePersistentSettings()
} }
QSettings *s = ICore::settings(); QSettings *s = ICore::settings();
if (!SessionManager::isDefaultVirgin())
s->setValue(QLatin1String("ProjectExplorer/StartupSession"), SessionManager::activeSession()); s->setValue(QLatin1String("ProjectExplorer/StartupSession"), SessionManager::activeSession());
s->remove(QLatin1String("ProjectExplorer/RecentProjects/Files")); s->remove(QLatin1String("ProjectExplorer/RecentProjects/Files"));
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