Fix semantics of "-lastsession"

Opening Qt Creator, closing it again, and then opening Qt Creator with
"-lastsession" opened some session - the last session that was opened in
Qt Creator at some earlier time.

The intention of "-lastsession" was more to re-open Qt Creator in the
state it was last closed from, so in this case it makes more sense to
not open a session at all.

Change-Id: Ia33ac5b79d93c7c97865186c56db2ef0b33b9f7c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Eike Ziller
2020-01-07 12:34:31 +01:00
parent c832f61e36
commit 6d15080b1e
4 changed files with 22 additions and 10 deletions

View File

@@ -1137,7 +1137,12 @@ bool SessionManager::loadSession(const QString &session, bool initial)
QString SessionManager::lastSession()
{
return ICore::settings()->value(QLatin1String("ProjectExplorer/StartupSession")).toString();
return ICore::settings()->value(Constants::LASTSESSION_KEY).toString();
}
QString SessionManager::startupSession()
{
return ICore::settings()->value(Constants::STARTUPSESSION_KEY).toString();
}
void SessionManager::reportProjectLoadingProgress()