aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/mcusupport/mcusupportsdk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/mcusupport/mcusupportsdk.cpp')
-rw-r--r--src/plugins/mcusupport/mcusupportsdk.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/plugins/mcusupport/mcusupportsdk.cpp b/src/plugins/mcusupport/mcusupportsdk.cpp
index b0d8a36cfd..fbdd2f38bb 100644
--- a/src/plugins/mcusupport/mcusupportsdk.cpp
+++ b/src/plugins/mcusupport/mcusupportsdk.cpp
@@ -37,6 +37,7 @@
#include "mcutargetfactory.h"
#include "mcutargetfactorylegacy.h"
+#include <app/app_version.h>
#include <baremetal/baremetalconstants.h>
#include <coreplugin/icore.h>
#include <projectexplorer/toolchain.h>
@@ -79,14 +80,22 @@ static FilePath findInProgramFiles(const QString &folder)
McuPackagePtr createQtForMCUsPackage(const SettingsHandler::Ptr &settingsHandler)
{
- return McuPackagePtr{
- new McuPackage(settingsHandler,
- McuPackage::tr("Qt for MCUs SDK"),
- FileUtils::homePath(), // defaultPath
- FilePath("bin/qmltocpp").withExecutableSuffix(), // detectionPath
- Constants::SETTINGS_KEY_PACKAGE_QT_FOR_MCUS_SDK, // settingsKey
- QStringLiteral("Qul_ROOT"), // cmakeVarName
- QStringLiteral("Qul_DIR"))}; // envVarName
+ auto package = new McuPackage(settingsHandler,
+ McuPackage::tr("Qt for MCUs SDK"),
+ FileUtils::homePath(), // defaultPath
+ FilePath("bin/qmltocpp").withExecutableSuffix(), // detectionPath
+ Constants::SETTINGS_KEY_PACKAGE_QT_FOR_MCUS_SDK, // settingsKey
+ QStringLiteral("Qul_ROOT"), // cmakeVarName
+ QStringLiteral("Qul_DIR"), // envVarName
+ {}, // download rul
+ new McuPackagePathVersionDetector(R"(\d.\d)") // version detector
+ );
+
+ if (IDE_VERSION_MAJOR < 9)
+ package->setVersions({"2.0", "2.1", "2.2"});
+ package->setIsQtMCUsPackage(true);
+
+ return McuPackagePtr{package};
}
static McuPackageVersionDetector *generatePackageVersionDetector(const QString &envVar)