CMakePM: Fix saving "Initial Configuration" values

Amends 6c5717844d

The CMakeBuildSystem::clearCMakeCache() would call
BuildSystem::emitParsingFinished which would clear the configuration in
the widget, effectively removing any "Initial Configuration" changes when
clicking on the "Re-configure with Initial Parameters" button.

This commit makes sure that the updateInitialCMakeArguments() function
is called before CMakeBuildSystem::clearCMakeCache(), and that only the
"Build > Clear CMake Configuration" action would
"disableCMakeBuildMenuActions" which is what an user would expect.

Fixes: QTCREATORBUG-31320
Change-Id: Ie7810c9bed000ca19a31a6ab8e7a281ae9f5e6f0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Cristian Adam
2024-07-27 14:41:25 +02:00
parent 01acba9533
commit 59ce9dc04b
4 changed files with 9 additions and 2 deletions

View File

@@ -1239,6 +1239,11 @@ void CMakeBuildSystem::clearCMakeCache()
path.removeRecursively();
emit configurationCleared();
}
void CMakeBuildSystem::disableCMakeBuildMenuActions()
{
emitParsingStarted();
emitParsingFinished(false);
}