CMakePM: Add action to reload CMake Presets

The CMake presets will be reloaded. The preset kits will get the CMake
configuration cleared (no more CMakeCache.txt)

All the kits will be removed from the project, so that the Kit
configuration wizard will be displayed at the end.

If a normal Qt Kit was configured, the user will get the chance to
import the existing configuration (the initial configuration will be
lost though).

Change-Id: Ieda83098d7716913d7870b67ab522705da4ed93b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Cristian Adam
2023-05-09 18:22:47 +02:00
parent ce7ee677d8
commit 9ff0cf7306
9 changed files with 141 additions and 7 deletions

View File

@@ -67,7 +67,7 @@ Tasks CMakeProject::projectIssues(const Kit *k) const
ProjectImporter *CMakeProject::projectImporter() const
{
if (!m_projectImporter)
m_projectImporter = new CMakeProjectImporter(projectFilePath(), m_presetsData);
m_projectImporter = new CMakeProjectImporter(projectFilePath(), this);
return m_projectImporter;
}
@@ -306,4 +306,15 @@ void CMakeProject::configureAsExampleProject(ProjectExplorer::Kit *kit)
setup(infoList);
}
void CMakeProjectManager::CMakeProject::setOldPresetKits(
const QList<ProjectExplorer::Kit *> &presetKits) const
{
m_oldPresetKits = presetKits;
}
QList<Kit *> CMakeProject::oldPresetKits() const
{
return m_oldPresetKits;
}
} // namespace CMakeProjectManager