summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/android/androidtoolchain.cpp6
-rw-r--r--src/plugins/ios/iosconfigurations.cpp5
-rw-r--r--src/plugins/projectexplorer/abstractmsvctoolchain.cpp8
-rw-r--r--src/plugins/projectexplorer/abstractmsvctoolchain.h4
-rw-r--r--src/plugins/projectexplorer/customtoolchain.cpp8
-rw-r--r--src/plugins/projectexplorer/customtoolchain.h2
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.cpp20
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.h2
-rw-r--r--src/plugins/projectexplorer/kitinformation.cpp8
-rw-r--r--src/plugins/projectexplorer/kitinformationconfigwidget.cpp6
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.cpp6
-rw-r--r--src/plugins/projectexplorer/settingsaccessor.cpp2
-rw-r--r--src/plugins/projectexplorer/toolchain.cpp26
-rw-r--r--src/plugins/projectexplorer/toolchain.h6
-rw-r--r--src/plugins/projectexplorer/toolchainmanager.cpp6
-rw-r--r--src/plugins/projectexplorer/toolchainmanager.h2
-rw-r--r--src/plugins/projectexplorer/wincetoolchain.cpp6
-rw-r--r--src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp2
-rw-r--r--src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h2
-rw-r--r--src/plugins/qnx/qnxtoolchain.cpp9
-rw-r--r--src/plugins/qtsupport/qtoptionspage.cpp14
-rw-r--r--src/plugins/qtsupport/qtoptionspage.h2
22 files changed, 74 insertions, 78 deletions
diff --git a/src/plugins/android/androidtoolchain.cpp b/src/plugins/android/androidtoolchain.cpp
index 4dccaaeafb..adf1a7e85a 100644
--- a/src/plugins/android/androidtoolchain.cpp
+++ b/src/plugins/android/androidtoolchain.cpp
@@ -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)
diff --git a/src/plugins/ios/iosconfigurations.cpp b/src/plugins/ios/iosconfigurations.cpp
index 4c7b692587..62df6241bb 100644
--- a/src/plugins/ios/iosconfigurations.cpp
+++ b/src/plugins/ios/iosconfigurations.cpp
@@ -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) {
diff --git a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
index fcdc9dd78b..02903718dc 100644
--- a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
+++ b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
@@ -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
{
diff --git a/src/plugins/projectexplorer/abstractmsvctoolchain.h b/src/plugins/projectexplorer/abstractmsvctoolchain.h
index cd9cdf3cea..b5c15f18bc 100644
--- a/src/plugins/projectexplorer/abstractmsvctoolchain.h
+++ b/src/plugins/projectexplorer/abstractmsvctoolchain.h
@@ -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;
diff --git a/src/plugins/projectexplorer/customtoolchain.cpp b/src/plugins/projectexplorer/customtoolchain.cpp
index aa4579672e..52b59eaaeb 100644
--- a/src/plugins/projectexplorer/customtoolchain.cpp
+++ b/src/plugins/projectexplorer/customtoolchain.cpp
@@ -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)
diff --git a/src/plugins/projectexplorer/customtoolchain.h b/src/plugins/projectexplorer/customtoolchain.h
index 79f8f7d140..1c7f1847b5 100644
--- a/src/plugins/projectexplorer/customtoolchain.h
+++ b/src/plugins/projectexplorer/customtoolchain.h
@@ -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:
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index 1ad40a8702..435e42cf09 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -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)
diff --git a/src/plugins/projectexplorer/gcctoolchain.h b/src/plugins/projectexplorer/gcctoolchain.h
index 66054a6738..4af8224d1b 100644
--- a/src/plugins/projectexplorer/gcctoolchain.h
+++ b/src/plugins/projectexplorer/gcctoolchain.h
@@ -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;
diff --git a/src/plugins/projectexplorer/kitinformation.cpp b/src/plugins/projectexplorer/kitinformation.cpp
index 19ef2a939b..65ef02d67c 100644
--- a/src/plugins/projectexplorer/kitinformation.cpp
+++ b/src/plugins/projectexplorer/kitinformation.cpp
@@ -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()
diff --git a/src/plugins/projectexplorer/kitinformationconfigwidget.cpp b/src/plugins/projectexplorer/kitinformationconfigwidget.cpp
index c146bddd66..2fe599c7ae 100644
--- a/src/plugins/projectexplorer/kitinformationconfigwidget.cpp
+++ b/src/plugins/projectexplorer/kitinformationconfigwidget.cpp
@@ -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;
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index 881a7dc9a5..8984635fce 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -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
diff --git a/src/plugins/projectexplorer/settingsaccessor.cpp b/src/plugins/projectexplorer/settingsaccessor.cpp
index 8702a8e6b4..0e98b8e02d 100644
--- a/src/plugins/projectexplorer/settingsaccessor.cpp
+++ b/src/plugins/projectexplorer/settingsaccessor.cpp
@@ -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;
}
}
diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp
index 54f3fbc4be..2c8be620b6 100644
--- a/src/plugins/projectexplorer/toolchain.cpp
+++ b/src/plugins/projectexplorer/toolchain.cpp
@@ -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)
diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h
index 1ad894741b..dd31161a01 100644
--- a/src/plugins/projectexplorer/toolchain.h
+++ b/src/plugins/projectexplorer/toolchain.h
@@ -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);
diff --git a/src/plugins/projectexplorer/toolchainmanager.cpp b/src/plugins/projectexplorer/toolchainmanager.cpp
index f928249743..f59050c2d2 100644
--- a/src/plugins/projectexplorer/toolchainmanager.cpp
+++ b/src/plugins/projectexplorer/toolchainmanager.cpp
@@ -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;
diff --git a/src/plugins/projectexplorer/toolchainmanager.h b/src/plugins/projectexplorer/toolchainmanager.h
index bbfcd00040..0b0a23e127 100644
--- a/src/plugins/projectexplorer/toolchainmanager.h
+++ b/src/plugins/projectexplorer/toolchainmanager.h
@@ -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);
diff --git a/src/plugins/projectexplorer/wincetoolchain.cpp b/src/plugins/projectexplorer/wincetoolchain.cpp
index 4a12ae2a06..1b0e92fc70 100644
--- a/src/plugins/projectexplorer/wincetoolchain.cpp
+++ b/src/plugins/projectexplorer/wincetoolchain.cpp
@@ -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
diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp
index f9a76f9c1c..50037d8494 100644
--- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp
@@ -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
diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h
index ee9582273d..695e2ed1f4 100644
--- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h
+++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h
@@ -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;
};
diff --git a/src/plugins/qnx/qnxtoolchain.cpp b/src/plugins/qnx/qnxtoolchain.cpp
index 6d59cea7b4..73337eb75d 100644
--- a/src/plugins/qnx/qnxtoolchain.cpp
+++ b/src/plugins/qnx/qnxtoolchain.cpp
@@ -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)
diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp
index 777575fcf7..4ad1d9e884 100644
--- a/src/plugins/qtsupport/qtoptionspage.cpp
+++ b/src/plugins/qtsupport/qtoptionspage.cpp
@@ -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())
diff --git a/src/plugins/qtsupport/qtoptionspage.h b/src/plugins/qtsupport/qtoptionspage.h
index d0ec1c2988..86319f9eda 100644
--- a/src/plugins/qtsupport/qtoptionspage.h
+++ b/src/plugins/qtsupport/qtoptionspage.h
@@ -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);