CMakePM: Don't show anything but CMake Preset Kits during initial configure

This is for projects that use CMake Presets, and matches the expectations of the users using CMake Presets.

The user can still enable a Kit from the left list of Kits, which is not filtered.

Amends 87c67fc6d7

Task-number: QTCREATORBUG-29535
Change-Id: If97eef867a687c877b1cbd08cd4537fe6459136f
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Cristian Adam
2024-02-20 13:45:48 +01:00
parent 1a7e1b5dbd
commit c9208932d7
4 changed files with 15 additions and 4 deletions

View File

@@ -201,8 +201,6 @@ FilePaths CMakeProjectImporter::presetCandidates()
}
}
m_hasCMakePresets = !candidates.isEmpty();
return candidates;
}
@@ -223,7 +221,7 @@ Target *CMakeProjectImporter::preferredTarget(const QList<Target *> &possibleTar
bool CMakeProjectImporter::filter(ProjectExplorer::Kit *k) const
{
if (!m_hasCMakePresets)
if (!m_project->presetsData().havePresets)
return true;
const auto presetConfigItem = CMakeConfigurationKitAspect::cmakePresetConfigItem(k);