Fix button states at startup

When opening Qt Creator with clean settings, the run, debug and build
actions build be in the wrong state (enabled instead of disabled, no
debug icon).

This happened because a ProjectExplorer::updateActions call was removed
from the end of restoring the session at startup when moving the session
handling to Core plugin.

That updateActions call shouldn't be necesseray, and isn't if a session
is loaded, even if it is the "implicit default", because then
sessionLoaded(...) is emitted which results in the updateActions() call.

The sessionLoaded(...) signal was not sent if the file for the default
session does not exist. Fix that by also sending the signal even if no
file was actually loaded.

Amends cbeac777a6

Change-Id: Idb625253f29611e777d85f0feb6c196fae567ed0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Eike Ziller
2023-07-06 14:03:59 +02:00
parent 7439fe2bd1
commit b5086172cc

View File

@@ -609,6 +609,7 @@ bool SessionManager::loadSession(const QString &session, bool initial)
return true; return true;
} }
} else if (loadImplicitDefault) { } else if (loadImplicitDefault) {
emit SessionManager::instance()->sessionLoaded(DEFAULT_SESSION);
return true; return true;
} }