summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2017-02-22 11:47:43 +0100
committerEike Ziller <eike.ziller@qt.io>2017-02-23 09:57:48 +0000
commit311bed936ca8ab907de8b6609f685d95a56b188c (patch)
treed7d06c4a386d4981f649273ff671cbad24400058
parent330d8cab16ad92b11f9f7ab823636fed3311ea09 (diff)
downloadqt-creator-311bed936ca8ab907de8b6609f685d95a56b188c.tar.gz
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: hjk <hjk@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index a4aed71e84..2bc865fc84 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -1556,7 +1556,8 @@ void ProjectExplorerPluginPrivate::savePersistentSettings()
}
QSettings *s = ICore::settings();
- s->setValue(QLatin1String("ProjectExplorer/StartupSession"), SessionManager::activeSession());
+ if (!SessionManager::isDefaultVirgin())
+ s->setValue(QLatin1String("ProjectExplorer/StartupSession"), SessionManager::activeSession());
s->remove(QLatin1String("ProjectExplorer/RecentProjects/Files"));
QStringList fileNames;