Commit cbf30289 authored by Tobias Hunger's avatar Tobias Hunger

ToolChain: Turn id into a QByteArray

That should take a couple of bytes less to store. Make sure this
change is invisible to the configuration files.

Change-Id: If5e73b52493c9164de9e342021d8153d274b350f
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
parent 6d5a5aff
......@@ -68,7 +68,7 @@ QHash<Abi, QList<int> > AndroidToolChainFactory::m_newestVersionForAbi;
FileName AndroidToolChainFactory::m_ndkLocation;
AndroidToolChain::AndroidToolChain(const Abi &abi, const QString &ndkToolChainVersion, Detection d)
: GccToolChain(QLatin1String(Constants::ANDROID_TOOLCHAIN_ID), d),
: GccToolChain(Constants::ANDROID_TOOLCHAIN_ID, d),
m_ndkToolChainVersion(ndkToolChainVersion), m_secondaryToolChain(false)
{
setTargetAbi(abi);
......@@ -79,7 +79,7 @@ AndroidToolChain::AndroidToolChain(const Abi &abi, const QString &ndkToolChainVe
// for fromMap
AndroidToolChain::AndroidToolChain()
: GccToolChain(QLatin1String(Constants::ANDROID_TOOLCHAIN_ID), ToolChain::ManualDetection),
: GccToolChain(Constants::ANDROID_TOOLCHAIN_ID, ToolChain::ManualDetection),
m_secondaryToolChain(false)
{
}
......@@ -271,7 +271,7 @@ QList<ToolChain *> AndroidToolChainFactory::autoDetect()
bool AndroidToolChainFactory::canRestore(const QVariantMap &data)
{
return idFromMap(data).startsWith(QLatin1String(Constants::ANDROID_TOOLCHAIN_ID) + QLatin1Char(':'));
return idFromMap(data).startsWith(QByteArray(Constants::ANDROID_TOOLCHAIN_ID) + ':');
}
ToolChain *AndroidToolChainFactory::restore(const QVariantMap &data)
......
......@@ -157,9 +157,8 @@ void IosConfigurations::updateAutomaticKitList()
if (p.compilerPath.toFileInfo().baseName().startsWith(QLatin1String("clang")))
toolchain = new ClangToolChain(ToolChain::AutoDetection);
else
toolchain = new GccToolChain(
QLatin1String(ProjectExplorer::Constants::GCC_TOOLCHAIN_ID),
ToolChain::AutoDetection);
toolchain = new GccToolChain(ProjectExplorer::Constants::GCC_TOOLCHAIN_ID,
ToolChain::AutoDetection);
QString baseDisplayName = p.name;
QString displayName = baseDisplayName;
for (int iVers = 1; iVers < 100; ++iVers) {
......
......@@ -47,7 +47,7 @@ namespace ProjectExplorer {
namespace Internal {
AbstractMsvcToolChain::AbstractMsvcToolChain(const QString &id,
AbstractMsvcToolChain::AbstractMsvcToolChain(const QByteArray &id,
Detection d,
const Abi &abi,
const QString& vcvarsBat) :
......@@ -62,12 +62,10 @@ AbstractMsvcToolChain::AbstractMsvcToolChain(const QString &id,
Q_ASSERT(!m_vcvarsBat.isEmpty());
}
AbstractMsvcToolChain::AbstractMsvcToolChain(const QString &id, Detection d) :
AbstractMsvcToolChain::AbstractMsvcToolChain(const QByteArray &id, Detection d) :
ToolChain(id, d),
m_lastEnvironment(Utils::Environment::systemEnvironment())
{
}
{ }
Abi AbstractMsvcToolChain::targetAbi() const
{
......
......@@ -44,8 +44,8 @@ namespace Internal {
class PROJECTEXPLORER_EXPORT AbstractMsvcToolChain : public ToolChain
{
public:
explicit AbstractMsvcToolChain(const QString &id, Detection d, const Abi &abi, const QString& vcvarsBat);
explicit AbstractMsvcToolChain(const QString &id, Detection d);
explicit AbstractMsvcToolChain(const QByteArray &id, Detection d, const Abi &abi, const QString& vcvarsBat);
explicit AbstractMsvcToolChain(const QByteArray &id, Detection d);
Abi targetAbi() const;
......
......@@ -78,11 +78,11 @@ static const char messageCapKeyC[] = "ProjectExplorer.CustomToolChain.MessageCap
// --------------------------------------------------------------------------
CustomToolChain::CustomToolChain(Detection d) :
ToolChain(QLatin1String(Constants::CUSTOM_TOOLCHAIN_ID), d),
ToolChain(Constants::CUSTOM_TOOLCHAIN_ID, d),
m_outputParser(Gcc)
{ }
CustomToolChain::CustomToolChain(const QString &id, Detection d) :
CustomToolChain::CustomToolChain(const QByteArray &id, Detection d) :
ToolChain(id, d)
{ }
......@@ -407,8 +407,8 @@ ToolChain *CustomToolChainFactory::create()
// Used by the ToolChainManager to restore user-generated tool chains
bool CustomToolChainFactory::canRestore(const QVariantMap &data)
{
const QString id = idFromMap(data);
return id.startsWith(QLatin1String(Constants::CUSTOM_TOOLCHAIN_ID) + QLatin1Char(':'));
const QByteArray id = idFromMap(data);
return id.startsWith(QByteArray(Constants::CUSTOM_TOOLCHAIN_ID) + ':');
}
ToolChain *CustomToolChainFactory::restore(const QVariantMap &data)
......
......@@ -123,7 +123,7 @@ public:
static QString parserName(OutputParser parser);
protected:
explicit CustomToolChain(const QString &id, Detection d);
explicit CustomToolChain(const QByteArray &id, Detection d);
CustomToolChain(const CustomToolChain &);
private:
......
......@@ -245,10 +245,10 @@ static QString gccVersion(const FileName &path, const QStringList &env)
// --------------------------------------------------------------------------
GccToolChain::GccToolChain(Detection d) :
ToolChain(QLatin1String(Constants::GCC_TOOLCHAIN_ID), d)
ToolChain(Constants::GCC_TOOLCHAIN_ID, d)
{ }
GccToolChain::GccToolChain(const QString &id, Detection d) :
GccToolChain::GccToolChain(const QByteArray &id, Detection d) :
ToolChain(id, d)
{ }
......@@ -805,8 +805,8 @@ QList<ToolChain *> GccToolChainFactory::autoDetect()
// Used by the ToolChainManager to restore user-generated tool chains
bool GccToolChainFactory::canRestore(const QVariantMap &data)
{
const QString id = idFromMap(data);
return id.startsWith(QLatin1String(Constants::GCC_TOOLCHAIN_ID) + QLatin1Char(':'));
const QByteArray id = idFromMap(data);
return id.startsWith(QByteArray(Constants::GCC_TOOLCHAIN_ID) + ':');
}
ToolChain *GccToolChainFactory::restore(const QVariantMap &data)
......@@ -1024,7 +1024,7 @@ void GccToolChainConfigWidget::handlePlatformLinkerFlagsChange()
// --------------------------------------------------------------------------
ClangToolChain::ClangToolChain(Detection d) :
GccToolChain(QLatin1String(Constants::CLANG_TOOLCHAIN_ID), d)
GccToolChain(Constants::CLANG_TOOLCHAIN_ID, d)
{ }
QString ClangToolChain::type() const
......@@ -1149,7 +1149,7 @@ ToolChain *ClangToolChainFactory::create()
bool ClangToolChainFactory::canRestore(const QVariantMap &data)
{
return idFromMap(data).startsWith(QLatin1String(Constants::CLANG_TOOLCHAIN_ID) + QLatin1Char(':'));
return idFromMap(data).startsWith(QByteArray(Constants::CLANG_TOOLCHAIN_ID) + ':');
}
ToolChain *ClangToolChainFactory::restore(const QVariantMap &data)
......@@ -1172,7 +1172,7 @@ GccToolChain *ClangToolChainFactory::createToolChain(bool autoDetect)
// --------------------------------------------------------------------------
MingwToolChain::MingwToolChain(Detection d) :
GccToolChain(QLatin1String(Constants::MINGW_TOOLCHAIN_ID), d)
GccToolChain(Constants::MINGW_TOOLCHAIN_ID, d)
{ }
QString MingwToolChain::type() const
......@@ -1255,7 +1255,7 @@ ToolChain *MingwToolChainFactory::create()
bool MingwToolChainFactory::canRestore(const QVariantMap &data)
{
return idFromMap(data).startsWith(QLatin1String(Constants::MINGW_TOOLCHAIN_ID) + QLatin1Char(':'));
return idFromMap(data).startsWith(QByteArray(Constants::MINGW_TOOLCHAIN_ID) + ':');
}
ToolChain *MingwToolChainFactory::restore(const QVariantMap &data)
......@@ -1278,7 +1278,7 @@ GccToolChain *MingwToolChainFactory::createToolChain(bool autoDetect)
// --------------------------------------------------------------------------
LinuxIccToolChain::LinuxIccToolChain(Detection d) :
GccToolChain(QLatin1String(Constants::LINUXICC_TOOLCHAIN_ID), d)
GccToolChain(Constants::LINUXICC_TOOLCHAIN_ID, d)
{ }
QString LinuxIccToolChain::type() const
......@@ -1351,7 +1351,7 @@ ToolChain *LinuxIccToolChainFactory::create()
bool LinuxIccToolChainFactory::canRestore(const QVariantMap &data)
{
return idFromMap(data).startsWith(QLatin1String(Constants::LINUXICC_TOOLCHAIN_ID) + QLatin1Char(':'));
return idFromMap(data).startsWith(QByteArray(Constants::LINUXICC_TOOLCHAIN_ID) + ':');
}
ToolChain *LinuxIccToolChainFactory::restore(const QVariantMap &data)
......
......@@ -57,7 +57,7 @@ class LinuxIccToolChainFactory;
class PROJECTEXPLORER_EXPORT GccToolChain : public ToolChain
{
public:
GccToolChain(const QString &id, Detection d);
GccToolChain(const QByteArray &id, Detection d);
QString type() const;
QString typeDisplayName() const;
Abi targetAbi() const;
......
......@@ -169,7 +169,7 @@ void ToolChainKitInformation::fix(Kit *k)
void ToolChainKitInformation::setup(Kit *k)
{
QTC_ASSERT(ToolChainManager::isLoaded(), return);
const QString id = k->value(ToolChainKitInformation::id()).toString();
const QByteArray id = k->value(ToolChainKitInformation::id()).toByteArray();
if (id.isEmpty())
return;
......@@ -179,7 +179,7 @@ void ToolChainKitInformation::setup(Kit *k)
// ID is not found: Might be an ABI string...
foreach (ToolChain *current, ToolChainManager::toolChains()) {
if (current->targetAbi().toString() == id)
if (current->targetAbi().toString() == QString::fromUtf8(id))
return setToolChain(k, current);
}
}
......@@ -237,12 +237,12 @@ ToolChain *ToolChainKitInformation::toolChain(const Kit *k)
QTC_ASSERT(ToolChainManager::isLoaded(), return 0);
if (!k)
return 0;
return ToolChainManager::findToolChain(k->value(ToolChainKitInformation::id()).toString());
return ToolChainManager::findToolChain(k->value(ToolChainKitInformation::id()).toByteArray());
}
void ToolChainKitInformation::setToolChain(Kit *k, ToolChain *tc)
{
k->setValue(ToolChainKitInformation::id(), tc ? tc->id() : QString());
k->setValue(ToolChainKitInformation::id(), tc ? QString::fromUtf8(tc->id()) : QString());
}
QString ToolChainKitInformation::msgNoToolChainInTarget()
......
......@@ -203,15 +203,15 @@ void ToolChainInformationConfigWidget::currentToolChainChanged(int idx)
if (m_ignoreChanges)
return;
const QString id = m_comboBox->itemData(idx).toString();
const QByteArray id = m_comboBox->itemData(idx).toByteArray();
ToolChainKitInformation::setToolChain(m_kit, ToolChainManager::findToolChain(id));
}
int ToolChainInformationConfigWidget::indexOf(const ToolChain *tc)
{
const QString id = tc ? tc->id() : QString();
const QByteArray id = tc ? tc->id() : QByteArray();
for (int i = 0; i < m_comboBox->count(); ++i) {
if (id == m_comboBox->itemData(i).toString())
if (id == m_comboBox->itemData(i).toByteArray())
return i;
}
return -1;
......
......@@ -343,7 +343,7 @@ Utils::Environment MsvcToolChain::readEnvironmentSetting(Utils::Environment& env
MsvcToolChain::MsvcToolChain(const QString &name, const Abi &abi,
const QString &varsBat, const QString &varsBatArg, Detection d) :
AbstractMsvcToolChain(QLatin1String(Constants::MSVC_TOOLCHAIN_ID), d, abi, varsBat),
AbstractMsvcToolChain(Constants::MSVC_TOOLCHAIN_ID, d, abi, varsBat),
m_varsBatArg(varsBatArg)
{
Q_ASSERT(!name.isEmpty());
......@@ -360,7 +360,7 @@ bool MsvcToolChain::isValid() const
}
MsvcToolChain::MsvcToolChain() :
AbstractMsvcToolChain(QLatin1String(Constants::MSVC_TOOLCHAIN_ID), ManualDetection)
AbstractMsvcToolChain(Constants::MSVC_TOOLCHAIN_ID, ManualDetection)
{
}
......@@ -632,7 +632,7 @@ bool MsvcToolChain::operator ==(const ToolChain &other) const
bool MsvcToolChainFactory::canRestore(const QVariantMap &data)
{
return idFromMap(data).startsWith(QLatin1String(Constants::MSVC_TOOLCHAIN_ID) + QLatin1Char(':'));
return idFromMap(data).startsWith(QByteArray(Constants::MSVC_TOOLCHAIN_ID) + ':');
}
} // namespace Internal
......
......@@ -2160,7 +2160,7 @@ QVariantMap UserFileVersion11Upgrader::upgrade(const QVariantMap &map)
foreach (ToolChain *tc, ToolChainManager::toolChains()) {
if ((tc->compilerCommand() == FileName::fromString(compilerPath))
&& (tc->targetAbi() == compilerAbi)) {
tcId = tc->id();
tcId = QString::fromUtf8(tc->id());
break;
}
}
......
......@@ -56,20 +56,20 @@ class ToolChainPrivate
public:
typedef ToolChain::Detection Detection;
explicit ToolChainPrivate(const QString &id, Detection d) :
explicit ToolChainPrivate(const QByteArray &id, Detection d) :
m_detection(d)
{
m_id = createId(id);
}
static QString createId(const QString &id)
static QByteArray createId(const QByteArray &id)
{
QString newId = id.left(id.indexOf(QLatin1Char(':')));
newId.append(QLatin1Char(':') + QUuid::createUuid().toString());
QByteArray newId = id.left(id.indexOf(':'));
newId.append(':' + QUuid::createUuid().toByteArray());
return newId;
}
QString m_id;
QByteArray m_id;
Detection m_detection;
mutable QString m_displayName;
};
......@@ -84,7 +84,7 @@ public:
// --------------------------------------------------------------------------
ToolChain::ToolChain(const QString &id, Detection d) :
ToolChain::ToolChain(const QByteArray &id, Detection d) :
d(new Internal::ToolChainPrivate(id, d))
{ }
......@@ -122,7 +122,7 @@ ToolChain::Detection ToolChain::detection() const
return d->m_detection;
}
QString ToolChain::id() const
QByteArray ToolChain::id() const
{
return d->m_id;
}
......@@ -147,8 +147,8 @@ bool ToolChain::operator == (const ToolChain &tc) const
if (this == &tc)
return true;
const QString thisId = id().left(id().indexOf(QLatin1Char(':')));
const QString tcId = tc.id().left(tc.id().indexOf(QLatin1Char(':')));
const QByteArray thisId = id().left(id().indexOf(':'));
const QByteArray tcId = tc.id().left(tc.id().indexOf(':'));
// We ignore displayname
return thisId == tcId && isAutoDetected() == tc.isAutoDetected();
......@@ -163,7 +163,7 @@ bool ToolChain::operator == (const ToolChain &tc) const
QVariantMap ToolChain::toMap() const
{
QVariantMap result;
result.insert(QLatin1String(ID_KEY), id());
result.insert(QLatin1String(ID_KEY), QString::fromUtf8(id()));
result.insert(QLatin1String(DISPLAY_NAME_KEY), displayName());
result.insert(QLatin1String(AUTODETECT_KEY), isAutoDetected());
......@@ -193,7 +193,7 @@ bool ToolChain::fromMap(const QVariantMap &data)
{
d->m_displayName = data.value(QLatin1String(DISPLAY_NAME_KEY)).toString();
// make sure we have new style ids:
d->m_id = data.value(QLatin1String(ID_KEY)).toString();
d->m_id = data.value(QLatin1String(ID_KEY)).toByteArray();
const bool autoDetect = data.value(QLatin1String(AUTODETECT_KEY), false).toBool();
d->m_detection = autoDetect ? AutoDetectionFromSettings : ManualDetection;
......@@ -257,9 +257,9 @@ ToolChain *ToolChainFactory::restore(const QVariantMap &)
return 0;
}
QString ToolChainFactory::idFromMap(const QVariantMap &data)
QByteArray ToolChainFactory::idFromMap(const QVariantMap &data)
{
return data.value(QLatin1String(ID_KEY)).toString();
return data.value(QLatin1String(ID_KEY)).toByteArray();
}
void ToolChainFactory::idToMap(QVariantMap &data, const QString id)
......
......@@ -77,7 +77,7 @@ public:
inline bool isAutoDetected() const { return detection() != ManualDetection; }
Detection detection() const;
QString id() const;
QByteArray id() const;
virtual QList<Utils::FileName> suggestedMkspecList() const;
virtual Utils::FileName suggestedDebugger() const;
......@@ -157,7 +157,7 @@ public:
virtual QVariantMap toMap() const;
virtual QList<Task> validateKit(const Kit *k) const;
protected:
explicit ToolChain(const QString &id, Detection d);
explicit ToolChain(const QByteArray &id, Detection d);
explicit ToolChain(const ToolChain &);
void toolChainUpdated();
......@@ -190,7 +190,7 @@ public:
virtual bool canRestore(const QVariantMap &data);
virtual ToolChain *restore(const QVariantMap &data);
static QString idFromMap(const QVariantMap &data);
static QByteArray idFromMap(const QVariantMap &data);
static void idToMap(QVariantMap &data, const QString id);
static void autoDetectionToMap(QVariantMap &data, bool detected);
......
......@@ -162,7 +162,7 @@ static QList<ToolChain *> restoreFromFile(const FileName &fileName)
}
if (!restored)
qWarning("Warning: Unable to restore compiler '%s' stored in %s.",
qPrintable(ToolChainFactory::idFromMap(tcMap)),
qPrintable(QString::fromUtf8(ToolChainFactory::idFromMap(tcMap))),
qPrintable(fileName.toUserOutput()));
}
......@@ -243,7 +243,7 @@ void ToolChainManager::restoreToolChains()
foreach (ToolChain *tc, tcsToCheck) {
if (!tc->isValid()) {
qWarning() << QString::fromLatin1("ToolChain \"%1\" (%2) dropped since it is not valid")
.arg(tc->displayName()).arg(tc->id());
.arg(tc->displayName()).arg(QString::fromUtf8(tc->id()));
delete tc;
} else {
tcsToRegister += tc;
......@@ -294,7 +294,7 @@ QList<ToolChain *> ToolChainManager::findToolChains(const Abi &abi)
return result;
}
ToolChain *ToolChainManager::findToolChain(const QString &id)
ToolChain *ToolChainManager::findToolChain(const QByteArray &id)
{
if (id.isEmpty())
return 0;
......
......@@ -59,7 +59,7 @@ public:
static QList<ToolChain *> toolChains();
static QList<ToolChain *> findToolChains(const Abi &abi);
static ToolChain *findToolChain(const QString &id);
static ToolChain *findToolChain(const QByteArray &id);
static Utils::FileName defaultDebugger(const Abi &abi);
......
......@@ -242,7 +242,7 @@ WinCEToolChain::WinCEToolChain(const QString &name,
const QString &includePath,
const QString &libPath,
Detection d) :
AbstractMsvcToolChain(QLatin1String(Constants::WINCE_TOOLCHAIN_ID), d, abi, vcvarsBat),
AbstractMsvcToolChain(Constants::WINCE_TOOLCHAIN_ID, d, abi, vcvarsBat),
m_msvcVer(msvcVer),
m_ceVer(ceVer),
m_binPath(binPath),
......@@ -258,7 +258,7 @@ WinCEToolChain::WinCEToolChain(const QString &name,
}
WinCEToolChain::WinCEToolChain() :
AbstractMsvcToolChain(QLatin1String(Constants::WINCE_TOOLCHAIN_ID), ManualDetection)
AbstractMsvcToolChain(Constants::WINCE_TOOLCHAIN_ID, ManualDetection)
{
}
......@@ -432,7 +432,7 @@ QString WinCEToolChain::autoDetectCdbDebugger(QStringList *checkedDirectories /*
bool WinCEToolChainFactory::canRestore(const QVariantMap &data)
{
return idFromMap(data).startsWith(QLatin1String(Constants::WINCE_TOOLCHAIN_ID) + QLatin1Char(':'));
return idFromMap(data).startsWith(QByteArray(Constants::WINCE_TOOLCHAIN_ID) + ':');
}
bool WinCEToolChain::operator ==(const ToolChain &other) const
......
......@@ -737,7 +737,7 @@ QmakeBuildConfiguration::LastKitState::LastKitState(Kit *k)
m_mkspec(QmakeKitInformation::mkspec(k).toString())
{
ToolChain *tc = ToolChainKitInformation::toolChain(k);
m_toolchain = tc ? tc->id() : QString();
m_toolchain = tc ? tc->id() : QByteArray();
}
bool QmakeBuildConfiguration::LastKitState::operator ==(const LastKitState &other) const
......
......@@ -138,7 +138,7 @@ private:
bool operator !=(const LastKitState &other) const;
private:
int m_qtVersion;
QString m_toolchain;
QByteArray m_toolchain;
QString m_sysroot;
QString m_mkspec;
};
......
......@@ -64,9 +64,8 @@ static void setQnxEnvironment(Utils::Environment &env, const QList<Utils::Enviro
}
QnxToolChain::QnxToolChain(ToolChain::Detection d)
: GccToolChain(QLatin1String(Constants::QNX_TOOLCHAIN_ID), d)
{
}
: GccToolChain(Constants::QNX_TOOLCHAIN_ID, d)
{ }
QString QnxToolChain::type() const
{
......@@ -164,8 +163,8 @@ QnxToolChainFactory::QnxToolChainFactory()
bool QnxToolChainFactory::canRestore(const QVariantMap &data)
{
const QString id = idFromMap(data);
return id.startsWith(QLatin1String(Constants::QNX_TOOLCHAIN_ID) + QLatin1Char(':'));
const QByteArray id = idFromMap(data);
return id.startsWith(QByteArray(Constants::QNX_TOOLCHAIN_ID) + ':');
}
ToolChain *QnxToolChainFactory::restore(const QVariantMap &data)
......
......@@ -310,7 +310,7 @@ void QtOptionsPageWidget::selectedToolChainChanged(int comboIndex)
QTreeWidgetItem *item = treeItemForIndex(index);
QTC_ASSERT(item, return);
QString toolChainId = m_debuggingHelperUi->toolChainComboBox->itemData(comboIndex).toString();
QByteArray toolChainId = m_debuggingHelperUi->toolChainComboBox->itemData(comboIndex).toByteArray();
item->setData(0, ToolChainIdRole, toolChainId);
}
......@@ -403,7 +403,7 @@ QList<ToolChain*> QtOptionsPageWidget::toolChains(const BaseQtVersion *version)
if (!version)
return toolChains;
QSet<QString> ids;
QSet<QByteArray> ids;
foreach (const Abi &a, version->qtAbis()) {
foreach (ToolChain *tc, ToolChainManager::findToolChains(a)) {
if (ids.contains(tc->id()))
......@@ -416,12 +416,12 @@ QList<ToolChain*> QtOptionsPageWidget::toolChains(const BaseQtVersion *version)
return toolChains;
}
QString QtOptionsPageWidget::defaultToolChainId(const BaseQtVersion *version)
QByteArray QtOptionsPageWidget::defaultToolChainId(const BaseQtVersion *version)
{
QList<ToolChain*> possibleToolChains = toolChains(version);
if (!possibleToolChains.isEmpty())
return possibleToolChains.first()->id();
return QString();
return QByteArray();
}
bool QtOptionsPageWidget::isNameUnique(const BaseQtVersion *version)
......@@ -469,8 +469,8 @@ void QtOptionsPageWidget::buildDebuggingHelper(DebuggingHelperBuildTask::Tools t
updateDebuggingHelperUi();
// Run a debugging helper build task in the background.
QString toolChainId = m_debuggingHelperUi->toolChainComboBox->itemData(
m_debuggingHelperUi->toolChainComboBox->currentIndex()).toString();
QByteArray toolChainId = m_debuggingHelperUi->toolChainComboBox->itemData(
m_debuggingHelperUi->toolChainComboBox->currentIndex()).toByteArray();
ToolChain *toolChain = ToolChainManager::findToolChain(toolChainId);
if (!toolChain)
return;
......@@ -780,7 +780,7 @@ void QtOptionsPageWidget::updateDebuggingHelperUi()
m_debuggingHelperUi->qmlDumpBuildButton->setEnabled(canBuildQmlDumper & !isBuildingQmlDumper);
QList<ToolChain*> toolchains = toolChains(currentVersion());
QString selectedToolChainId = currentItem->data(0, ToolChainIdRole).toString();
QByteArray selectedToolChainId = currentItem->data(0, ToolChainIdRole).toByteArray();
m_debuggingHelperUi->toolChainComboBox->clear();
for (int i = 0; i < toolchains.size(); ++i) {
if (!toolchains.at(i)->isValid())
......
......@@ -124,7 +124,7 @@ private:
};
ValidityInfo validInformation(const BaseQtVersion *version);
QList<ProjectExplorer::ToolChain*> toolChains(const BaseQtVersion *version);
QString defaultToolChainId(const BaseQtVersion *verison);
QByteArray defaultToolChainId(const BaseQtVersion *version);
bool isNameUnique(const BaseQtVersion *version);
void updateVersionItem(BaseQtVersion *version);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment