From 6aaf33bee5eb205e03baace73147a222f1144246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sivert=20Kr=C3=B8vel?= Date: Thu, 3 Nov 2022 20:07:29 +0100 Subject: [PATCH] McuSupport: Do not update paths in kits for different SDK versions When updating paths for a target in Devices > MCU, the paths were updated in the corresponding kits for all Qt for MCUs versions. This would break existing kits made for a different version than the currently active one. With this change, only kits made for the same SDK version as the currently selected target will be modified. Task-number: UL-6755 Change-Id: I6fda050094b5603914fbbc29a5fc2e83d974a2d6 Reviewed-by: Reviewed-by: Rainer Keller Reviewed-by: Eike Ziller --- src/plugins/mcusupport/mcukitmanager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/mcusupport/mcukitmanager.cpp b/src/plugins/mcusupport/mcukitmanager.cpp index 84299939e1d..cdee6cf5817 100644 --- a/src/plugins/mcusupport/mcukitmanager.cpp +++ b/src/plugins/mcusupport/mcukitmanager.cpp @@ -593,6 +593,11 @@ void updatePathsInExistingKits(const SettingsHandler::Ptr &settingsHandler) for (const auto &target : std::as_const(repo.mcuTargets)) { if (target->isValid()) { for (auto *kit : kitsWithMismatchedDependencies(target.get())) { + if (kitQulVersion(kit) != target->qulVersion()) { + //Do not update kits made for other Qt for MCUs SDK versions + continue; + } + auto changes = cMakeConfigToMap(CMakeConfigurationKitAspect::configuration(kit)); const auto updateForPackage = [&changes](const McuPackagePtr &package) {