CMakePM: Allow CMake peset kits refresh without configuring first

This allows the user to reload the presets kits after editing
CMakePresets.json without configuring the project first.

Fixes: QTCREATORBUG-30238
Change-Id: Id448dd8e821591f6357ec9618f114733c13a3121
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Cristian Adam
2024-02-05 12:16:55 +01:00
parent c06dfdb237
commit 86b6d852b4
4 changed files with 20 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
#include "cmakeprocess.h"
#include "cmakeproject.h"
#include "cmakeprojectconstants.h"
#include "cmakeprojectimporter.h"
#include "cmakeprojectmanagertr.h"
#include "cmakeprojectnodes.h"
#include "cmakespecificsettings.h"
@@ -362,6 +363,8 @@ void CMakeManager::reloadCMakePresets()
project->setOldPresetKits(oldKits);
emit project->projectImporter()->cmakePresetsUpdated();
Core::ModeManager::activateMode(ProjectExplorer::Constants::MODE_SESSION);
Core::ModeManager::setFocusToCurrentMode();
}