forked from qt-creator/qt-creator
McuSupport: Add SDK version to kit name (and to kit data)
First step towards Qt for MCUs SDK version handling. Task-number: QTCREATORBUG-23823 Change-Id: I125fe841d9355aa26b4e4701ac9a5fec31987e08 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -34,6 +34,7 @@ const char RUNCONFIGURATION[] = "McuSupport.RunConfiguration";
|
|||||||
const char SETTINGS_ID[] = "CC.McuSupport.Configuration";
|
const char SETTINGS_ID[] = "CC.McuSupport.Configuration";
|
||||||
const char KIT_MCUTARGET_VENDOR_KEY[] = "McuSupport.McuTargetVendor";
|
const char KIT_MCUTARGET_VENDOR_KEY[] = "McuSupport.McuTargetVendor";
|
||||||
const char KIT_MCUTARGET_MODEL_KEY[] = "McuSupport.McuTargetModel";
|
const char KIT_MCUTARGET_MODEL_KEY[] = "McuSupport.McuTargetModel";
|
||||||
|
const char KIT_MCUTARGET_SDKVERSION_KEY[] = "McuSupport.McuTargetSdkVersion";
|
||||||
|
|
||||||
const char SETTINGS_GROUP[] = "McuSupport";
|
const char SETTINGS_GROUP[] = "McuSupport";
|
||||||
const char SETTINGS_KEY_PACKAGE_PREFIX[] = "Package_";
|
const char SETTINGS_KEY_PACKAGE_PREFIX[] = "Package_";
|
||||||
|
@@ -404,6 +404,12 @@ void McuSupportOptions::deletePackagesAndTargets()
|
|||||||
mcuTargets.clear();
|
mcuTargets.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QVersionNumber &McuSupportOptions::supportedQulVersion()
|
||||||
|
{
|
||||||
|
static const QVersionNumber v({1, 1, 0});
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
void McuSupportOptions::setQulDir(const Utils::FilePath &dir)
|
void McuSupportOptions::setQulDir(const Utils::FilePath &dir)
|
||||||
{
|
{
|
||||||
deletePackagesAndTargets();
|
deletePackagesAndTargets();
|
||||||
@@ -443,6 +449,8 @@ static void setKitProperties(const QString &kitName, ProjectExplorer::Kit *k,
|
|||||||
k->setUnexpandedDisplayName(kitName);
|
k->setUnexpandedDisplayName(kitName);
|
||||||
k->setValue(Constants::KIT_MCUTARGET_VENDOR_KEY, mcuTarget->vendor());
|
k->setValue(Constants::KIT_MCUTARGET_VENDOR_KEY, mcuTarget->vendor());
|
||||||
k->setValue(Constants::KIT_MCUTARGET_MODEL_KEY, mcuTarget->qulPlatform());
|
k->setValue(Constants::KIT_MCUTARGET_MODEL_KEY, mcuTarget->qulPlatform());
|
||||||
|
k->setValue(Constants::KIT_MCUTARGET_SDKVERSION_KEY,
|
||||||
|
McuSupportOptions::supportedQulVersion().toString());
|
||||||
k->setAutoDetected(true);
|
k->setAutoDetected(true);
|
||||||
k->makeSticky();
|
k->makeSticky();
|
||||||
if (mcuTargetIsDesktop(mcuTarget)) {
|
if (mcuTargetIsDesktop(mcuTarget)) {
|
||||||
@@ -539,8 +547,8 @@ QString McuSupportOptions::kitName(const McuTarget *mcuTarget) const
|
|||||||
const QString colorDepth = mcuTarget->colorDepth() > 0
|
const QString colorDepth = mcuTarget->colorDepth() > 0
|
||||||
? QString::fromLatin1(" %1bpp").arg(mcuTarget->colorDepth())
|
? QString::fromLatin1(" %1bpp").arg(mcuTarget->colorDepth())
|
||||||
: "";
|
: "";
|
||||||
return QString::fromLatin1("Qt for MCUs - %1%2")
|
return QString::fromLatin1("Qt for MCUs %1 - %2%3")
|
||||||
.arg(mcuTarget->qulPlatform(), colorDepth);
|
.arg(supportedQulVersion().toString(), mcuTarget->qulPlatform(), colorDepth);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<ProjectExplorer::Kit *> McuSupportOptions::existingKits(const McuTarget *mcuTargt)
|
QList<ProjectExplorer::Kit *> McuSupportOptions::existingKits(const McuTarget *mcuTargt)
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
|
#include <QVersionNumber>
|
||||||
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QWidget)
|
QT_FORWARD_DECLARE_CLASS(QWidget)
|
||||||
|
|
||||||
@@ -170,6 +171,8 @@ public:
|
|||||||
static void registerQchFiles();
|
static void registerQchFiles();
|
||||||
static void registerExamples();
|
static void registerExamples();
|
||||||
|
|
||||||
|
static const QVersionNumber &supportedQulVersion();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void deletePackagesAndTargets();
|
void deletePackagesAndTargets();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user