McuSupport: Read supported targets from SDK .json files

... Replace the current hard-coded list of supported (non-Desktop)
targets.

Task-number: UL-2012
Change-Id: I65851d11eea9f62635d56c42788caeae8a77a4f3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2020-05-07 12:38:28 +02:00
parent 7a63a47ef0
commit f08fe165ab
3 changed files with 147 additions and 88 deletions

View File

@@ -61,7 +61,7 @@
namespace McuSupport {
namespace Internal {
static const int KIT_VERSION = 3; // Bumps up whenever details in Kit creation change
static const int KIT_VERSION = 4; // Bumps up whenever details in Kit creation change
static QString packagePathFromSettings(const QString &settingsKey, const QString &defaultPath = {})
{
@@ -441,14 +441,14 @@ void McuSupportOptions::deletePackagesAndTargets()
const QVersionNumber &McuSupportOptions::supportedQulVersion()
{
static const QVersionNumber v({1, 1, 0});
static const QVersionNumber v({1, 1});
return v;
}
void McuSupportOptions::setQulDir(const Utils::FilePath &dir)
{
deletePackagesAndTargets();
Sdk::hardcodedTargetsAndPackages(dir, &packages, &mcuTargets);
Sdk::targetsAndPackages(dir, &packages, &mcuTargets);
//packages.append(qtForMCUsSdkPackage);
for (auto package : packages) {
connect(package, &McuPackage::changed, [this](){