diff options
author | Cristian Adam <cristian.adam@qt.io> | 2023-10-20 11:01:59 +0200 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2023-10-20 10:07:17 +0000 |
commit | 32b6e6309e02369404b3a164d7c283a61f0312bd (patch) | |
tree | 443f0ee2d59edad9f18659532e017f731b4a1397 | |
parent | fbe9f2c614e0a8cd07def34944dfc355abbafe29 (diff) |
CMakePM: Remove remainders of extraGenerator
It was not possible to set the toolset for Visual Studio 2022 generator.
Amends 4f26d802ca863d90d213813d7117cdc179ab4336
Change-Id: I56caf9c0d66812eb599646a3679602af7372f419
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakekitaspect.cpp | 7 | ||||
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmaketool.cpp | 4 | ||||
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmaketool.h | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakekitaspect.cpp b/src/plugins/cmakeprojectmanager/cmakekitaspect.cpp index c18d047e61..6c112f01d5 100644 --- a/src/plugins/cmakeprojectmanager/cmakekitaspect.cpp +++ b/src/plugins/cmakeprojectmanager/cmakekitaspect.cpp @@ -503,11 +503,9 @@ class GeneratorInfo public: GeneratorInfo() = default; GeneratorInfo(const QString &generator_, - const QString &extraGenerator_ = QString(), const QString &platform_ = QString(), const QString &toolset_ = QString()) : generator(generator_) - , extraGenerator(extraGenerator_) , platform(platform_) , toolset(toolset_) {} @@ -747,7 +745,7 @@ Tasks CMakeGeneratorKitAspectFactory::validate(const Kit *k) const const GeneratorInfo info = generatorInfo(k); QList<CMakeTool::Generator> known = tool->supportedGenerators(); auto it = std::find_if(known.constBegin(), known.constEnd(), [info](const CMakeTool::Generator &g) { - return g.matches(info.generator, info.extraGenerator); + return g.matches(info.generator); }); if (it == known.constEnd()) { addWarning(Tr::tr("CMake Tool does not support the configured generator.")); @@ -786,7 +784,7 @@ void CMakeGeneratorKitAspectFactory::fix(Kit *k) QList<CMakeTool::Generator> known = tool->supportedGenerators(); auto it = std::find_if(known.constBegin(), known.constEnd(), [info](const CMakeTool::Generator &g) { - return g.matches(info.generator, info.extraGenerator); + return g.matches(info.generator); }); if (it == known.constEnd()) { GeneratorInfo dv; @@ -794,7 +792,6 @@ void CMakeGeneratorKitAspectFactory::fix(Kit *k) setGeneratorInfo(k, dv); } else { const GeneratorInfo dv(isIos(k) ? QString("Xcode") : info.generator, - info.extraGenerator, it->supportsPlatform ? info.platform : QString(), it->supportsToolset ? info.toolset : QString()); setGeneratorInfo(k, dv); diff --git a/src/plugins/cmakeprojectmanager/cmaketool.cpp b/src/plugins/cmakeprojectmanager/cmaketool.cpp index a24114bb35..f49df2083b 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketool.cpp @@ -45,9 +45,9 @@ const char CMAKE_INFORMATION_AUTODETECTED[] = "AutoDetected"; const char CMAKE_INFORMATION_DETECTIONSOURCE[] = "DetectionSource"; const char CMAKE_INFORMATION_READERTYPE[] = "ReaderType"; -bool CMakeTool::Generator::matches(const QString &n, const QString &ex) const +bool CMakeTool::Generator::matches(const QString &n) const { - return n == name && (ex.isEmpty() || extraGenerators.contains(ex)); + return n == name; } namespace Internal { diff --git a/src/plugins/cmakeprojectmanager/cmaketool.h b/src/plugins/cmakeprojectmanager/cmaketool.h index c9bc6e02e3..0fa06e5ca1 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.h +++ b/src/plugins/cmakeprojectmanager/cmaketool.h @@ -63,7 +63,7 @@ public: bool supportsPlatform = true; bool supportsToolset = true; - bool matches(const QString &n, const QString &ex = QString()) const; + bool matches(const QString &n) const; }; using PathMapper = std::function<Utils::FilePath (const Utils::FilePath &)>; |