Commit 83085439 authored by Tobias Hunger's avatar Tobias Hunger

Support multiple mkspecs per tool chain

This is necessary to handle Qt 5 moving mkspecs out of unsupported.

Task-number: QTCREATORBUG-6862
Change-Id: I193e3d16467773a2a714ef44f8d441d2d2395801
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent b4942447
...@@ -406,7 +406,7 @@ Utils::FileName GccToolChain::debuggerCommand() const ...@@ -406,7 +406,7 @@ Utils::FileName GccToolChain::debuggerCommand() const
return m_debuggerCommand; return m_debuggerCommand;
} }
Utils::FileName GccToolChain::suggestedMkspec() const QList<Utils::FileName> GccToolChain::suggestedMkspecList() const
{ {
Abi abi = targetAbi(); Abi abi = targetAbi();
Abi host = Abi::hostAbi(); Abi host = Abi::hostAbi();
...@@ -415,30 +415,30 @@ Utils::FileName GccToolChain::suggestedMkspec() const ...@@ -415,30 +415,30 @@ Utils::FileName GccToolChain::suggestedMkspec() const
if (abi.architecture() != host.architecture() if (abi.architecture() != host.architecture()
|| abi.os() != host.os() || abi.os() != host.os()
|| abi.osFlavor() != host.osFlavor()) // Note: This can fail:-( || abi.osFlavor() != host.osFlavor()) // Note: This can fail:-(
return Utils::FileName(); return QList<Utils::FileName>();
if (abi.os() == Abi::MacOS) { if (abi.os() == Abi::MacOS) {
QString v = version(); QString v = version();
// prefer versioned g++ on mac. This is required to enable building for older Mac OS versions // prefer versioned g++ on mac. This is required to enable building for older Mac OS versions
if (v.startsWith(QLatin1String("4.0")) && m_compilerCommand.endsWith(QLatin1String("-4.0"))) if (v.startsWith(QLatin1String("4.0")) && m_compilerCommand.endsWith(QLatin1String("-4.0")))
return Utils::FileName::fromString(QLatin1String("macx-g++40")); return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("macx-g++40"));
if (v.startsWith(QLatin1String("4.2")) && m_compilerCommand.endsWith(QLatin1String("-4.2"))) if (v.startsWith(QLatin1String("4.2")) && m_compilerCommand.endsWith(QLatin1String("-4.2")))
return Utils::FileName::fromString(QLatin1String("macx-g++42")); return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("macx-g++42"));
return Utils::FileName::fromString(QLatin1String("macx-g++")); return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("macx-g++"));
} }
if (abi.os() == Abi::LinuxOS) { if (abi.os() == Abi::LinuxOS) {
if (abi.osFlavor() != Abi::GenericLinuxFlavor) if (abi.osFlavor() != Abi::GenericLinuxFlavor)
return Utils::FileName(); // most likely not a desktop, so leave the mkspec alone. return QList<Utils::FileName>(); // most likely not a desktop, so leave the mkspec alone.
if (abi.wordWidth() == host.wordWidth()) if (abi.wordWidth() == host.wordWidth())
return Utils::FileName::fromString(QLatin1String("linux-g++")); // no need to explicitly set the word width return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("linux-g++")); // no need to explicitly set the word width
return Utils::FileName::fromString(QLatin1String("linux-g++-") + QString::number(m_targetAbi.wordWidth())); return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("linux-g++-") + QString::number(m_targetAbi.wordWidth()));
} }
if (abi.os() == Abi::BsdOS && abi.osFlavor() == Abi::FreeBsdFlavor) if (abi.os() == Abi::BsdOS && abi.osFlavor() == Abi::FreeBsdFlavor)
return Utils::FileName::fromString(QLatin1String("freebsd-g++")); return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("freebsd-g++"));
return Utils::FileName(); return QList<Utils::FileName>();
} }
QString GccToolChain::makeCommand() const QString GccToolChain::makeCommand() const
...@@ -702,7 +702,7 @@ void Internal::GccToolChainConfigWidget::apply() ...@@ -702,7 +702,7 @@ void Internal::GccToolChainConfigWidget::apply()
tc->setTargetAbi(m_abiWidget->currentAbi()); tc->setTargetAbi(m_abiWidget->currentAbi());
tc->setDisplayName(displayName); // reset display name tc->setDisplayName(displayName); // reset display name
tc->setDebuggerCommand(debuggerCommand()); tc->setDebuggerCommand(debuggerCommand());
tc->setMkspec(mkspec()); tc->setMkspecList(mkspecList());
m_autoDebuggerCommand = Utils::FileName::fromString(QLatin1String("<manually set>")); m_autoDebuggerCommand = Utils::FileName::fromString(QLatin1String("<manually set>"));
} }
...@@ -716,7 +716,7 @@ void Internal::GccToolChainConfigWidget::setFromToolchain() ...@@ -716,7 +716,7 @@ void Internal::GccToolChainConfigWidget::setFromToolchain()
if (!m_isReadOnly && !m_compilerCommand->path().isEmpty()) if (!m_isReadOnly && !m_compilerCommand->path().isEmpty())
m_abiWidget->setEnabled(true); m_abiWidget->setEnabled(true);
setDebuggerCommand(tc->debuggerCommand()); setDebuggerCommand(tc->debuggerCommand());
setMkspec(tc->mkspec()); setMkspecList(tc->mkspecList());
blockSignals(blocked); blockSignals(blocked);
} }
...@@ -727,7 +727,7 @@ bool Internal::GccToolChainConfigWidget::isDirty() const ...@@ -727,7 +727,7 @@ bool Internal::GccToolChainConfigWidget::isDirty() const
return m_compilerCommand->fileName() != tc->compilerCommand() return m_compilerCommand->fileName() != tc->compilerCommand()
|| m_abiWidget->currentAbi() != tc->targetAbi() || m_abiWidget->currentAbi() != tc->targetAbi()
|| debuggerCommand() != tc->debuggerCommand() || debuggerCommand() != tc->debuggerCommand()
|| mkspec() != tc->mkspec(); || mkspecList() != tc->mkspecList();
} }
void Internal::GccToolChainConfigWidget::makeReadOnly() void Internal::GccToolChainConfigWidget::makeReadOnly()
...@@ -792,14 +792,18 @@ QString ClangToolChain::makeCommand() const ...@@ -792,14 +792,18 @@ QString ClangToolChain::makeCommand() const
#endif #endif
} }
Utils::FileName ClangToolChain::suggestedMkspec() const QList<Utils::FileName> ClangToolChain::suggestedMkspecList() const
{ {
Abi abi = targetAbi(); Abi abi = targetAbi();
if (abi.os() == Abi::MacOS) if (abi.os() == Abi::MacOS)
return Utils::FileName::fromString(QLatin1String("unsupported/macx-clang")); return QList<Utils::FileName>()
<< Utils::FileName::fromString(QLatin1String("macx-clang"))
<< Utils::FileName::fromString(QLatin1String("unsupported/macx-clang"));
else if (abi.os() == Abi::LinuxOS) else if (abi.os() == Abi::LinuxOS)
return Utils::FileName::fromString(QLatin1String("unsupported/linux-clang")); return QList<Utils::FileName>()
return Utils::FileName(); // Note: Not supported by Qt yet, so default to the mkspec the Qt was build with << Utils::FileName::fromString(QLatin1String("linux-clang"))
<< Utils::FileName::fromString(QLatin1String("unsupported/linux-clang"));
return QList<Utils::FileName>(); // Note: Not supported by Qt yet, so default to the mkspec the Qt was build with
} }
IOutputParser *ClangToolChain::outputParser() const IOutputParser *ClangToolChain::outputParser() const
...@@ -880,15 +884,19 @@ QString MingwToolChain::typeDisplayName() const ...@@ -880,15 +884,19 @@ QString MingwToolChain::typeDisplayName() const
return Internal::MingwToolChainFactory::tr("MinGW"); return Internal::MingwToolChainFactory::tr("MinGW");
} }
Utils::FileName MingwToolChain::suggestedMkspec() const QList<Utils::FileName> MingwToolChain::suggestedMkspecList() const
{ {
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
return Utils::FileName::fromString(QLatin1String("win32-g++")); return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("win32-g++"));
#elif defined(Q_OS_LINUX) #elif defined(Q_OS_LINUX)
if (version().startsWith("4.6.")) if (version().startsWith("4.6."))
return Utils::FileName::fromString(QLatin1String("unsupported/win32-g++-4.6-cross")); return QList<Utils::FileName>()
<< Utils::FileName::fromString(QLatin1String("win32-g++-4.6-cross"))
<< Utils::FileName::fromString(QLatin1String("unsupported/win32-g++-4.6-cross"));
else else
return Utils::FileName::fromString(QLatin1String("unsupported/win32-g++-cross")); return QList<Utils::FileName>()
<< Utils::FileName::fromString(QLatin1String("win32-g++-cross"))
<< Utils::FileName::fromString(QLatin1String("unsupported/win32-g++-cross"));
#else #else
return Utils::FileName(); return Utils::FileName();
#endif #endif
...@@ -992,9 +1000,10 @@ IOutputParser *LinuxIccToolChain::outputParser() const ...@@ -992,9 +1000,10 @@ IOutputParser *LinuxIccToolChain::outputParser() const
return new LinuxIccParser; return new LinuxIccParser;
} }
Utils::FileName LinuxIccToolChain::suggestedMkspec() const QList<Utils::FileName> LinuxIccToolChain::suggestedMkspecList() const
{ {
return Utils::FileName::fromString(QLatin1String("linux-icc-") + QString::number(targetAbi().wordWidth())); return QList<Utils::FileName>()
<< Utils::FileName::fromString(QLatin1String("linux-icc-") + QString::number(targetAbi().wordWidth()));
} }
ToolChain *LinuxIccToolChain::clone() const ToolChain *LinuxIccToolChain::clone() const
......
...@@ -71,7 +71,7 @@ public: ...@@ -71,7 +71,7 @@ public:
QString makeCommand() const; QString makeCommand() const;
void setDebuggerCommand(const Utils::FileName &); void setDebuggerCommand(const Utils::FileName &);
Utils::FileName debuggerCommand() const; Utils::FileName debuggerCommand() const;
Utils::FileName suggestedMkspec() const; QList<Utils::FileName> suggestedMkspecList() const;
IOutputParser *outputParser() const; IOutputParser *outputParser() const;
QVariantMap toMap() const; QVariantMap toMap() const;
...@@ -129,7 +129,7 @@ public: ...@@ -129,7 +129,7 @@ public:
ToolChain *clone() const; ToolChain *clone() const;
Utils::FileName suggestedMkspec() const; QList<Utils::FileName> suggestedMkspecList() const;
private: private:
ClangToolChain(bool autodetect); ClangToolChain(bool autodetect);
...@@ -151,7 +151,7 @@ public: ...@@ -151,7 +151,7 @@ public:
ToolChain *clone() const; ToolChain *clone() const;
Utils::FileName suggestedMkspec() const; QList<Utils::FileName> suggestedMkspecList() const;
private: private:
MingwToolChain(bool autodetect); MingwToolChain(bool autodetect);
...@@ -174,7 +174,7 @@ public: ...@@ -174,7 +174,7 @@ public:
ToolChain *clone() const; ToolChain *clone() const;
Utils::FileName suggestedMkspec() const; QList<Utils::FileName> suggestedMkspecList() const;
private: private:
LinuxIccToolChain(bool autodetect); LinuxIccToolChain(bool autodetect);
......
...@@ -328,15 +328,15 @@ QString MsvcToolChain::typeDisplayName() const ...@@ -328,15 +328,15 @@ QString MsvcToolChain::typeDisplayName() const
return MsvcToolChainFactory::tr("MSVC"); return MsvcToolChainFactory::tr("MSVC");
} }
Utils::FileName MsvcToolChain::suggestedMkspec() const QList<Utils::FileName> MsvcToolChain::suggestedMkspecList() const
{ {
if (m_abi.osFlavor() == Abi::WindowsMsvc2005Flavor) if (m_abi.osFlavor() == Abi::WindowsMsvc2005Flavor)
return Utils::FileName::fromString(QLatin1String("win32-msvc2005")); return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("win32-msvc2005"));
if (m_abi.osFlavor() == Abi::WindowsMsvc2008Flavor) if (m_abi.osFlavor() == Abi::WindowsMsvc2008Flavor)
return Utils::FileName::fromString(QLatin1String("win32-msvc2008")); return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("win32-msvc2008"));
if (m_abi.osFlavor() == Abi::WindowsMsvc2010Flavor) if (m_abi.osFlavor() == Abi::WindowsMsvc2010Flavor)
return Utils::FileName::fromString(QLatin1String("win32-msvc2010")); return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("win32-msvc2010"));
return Utils::FileName(); return QList<Utils::FileName>();
} }
QVariantMap MsvcToolChain::toMap() const QVariantMap MsvcToolChain::toMap() const
...@@ -436,7 +436,7 @@ void MsvcToolChainConfigWidget::apply() ...@@ -436,7 +436,7 @@ void MsvcToolChainConfigWidget::apply()
MsvcToolChain *tc = static_cast<MsvcToolChain *>(toolChain()); MsvcToolChain *tc = static_cast<MsvcToolChain *>(toolChain());
QTC_ASSERT(tc, return; ); QTC_ASSERT(tc, return; );
tc->setDebuggerCommand(debuggerCommand()); tc->setDebuggerCommand(debuggerCommand());
tc->setMkspec(mkspec()); tc->setMkspecList(mkspecList());
} }
void MsvcToolChainConfigWidget::setFromToolChain() void MsvcToolChainConfigWidget::setFromToolChain()
...@@ -450,7 +450,7 @@ void MsvcToolChainConfigWidget::setFromToolChain() ...@@ -450,7 +450,7 @@ void MsvcToolChainConfigWidget::setFromToolChain()
} }
m_varsBatDisplayLabel->setText(varsBatDisplay); m_varsBatDisplayLabel->setText(varsBatDisplay);
setDebuggerCommand(tc->debuggerCommand()); setDebuggerCommand(tc->debuggerCommand());
setMkspec(tc->mkspec()); setMkspecList(tc->mkspecList());
} }
bool MsvcToolChainConfigWidget::isDirty() const bool MsvcToolChainConfigWidget::isDirty() const
...@@ -458,7 +458,7 @@ bool MsvcToolChainConfigWidget::isDirty() const ...@@ -458,7 +458,7 @@ bool MsvcToolChainConfigWidget::isDirty() const
MsvcToolChain *tc = static_cast<MsvcToolChain *>(toolChain()); MsvcToolChain *tc = static_cast<MsvcToolChain *>(toolChain());
QTC_ASSERT(tc, return false); QTC_ASSERT(tc, return false);
return debuggerCommand() != tc->debuggerCommand() return debuggerCommand() != tc->debuggerCommand()
|| mkspec() != tc->mkspec(); || mkspecList() != tc->mkspecList();
} }
void MsvcToolChainConfigWidget::autoDetectDebugger() void MsvcToolChainConfigWidget::autoDetectDebugger()
......
...@@ -57,7 +57,7 @@ public: ...@@ -57,7 +57,7 @@ public:
MsvcToolChain(const QString &name, const Abi &abi, MsvcToolChain(const QString &name, const Abi &abi,
const QString &varsBat, const QString &varsBatArg, bool autodetect = false); const QString &varsBat, const QString &varsBatArg, bool autodetect = false);
QString legacyId() const; QString legacyId() const;
Utils::FileName suggestedMkspec() const; QList<Utils::FileName> suggestedMkspecList() const;
static MsvcToolChain *readFromMap(const QVariantMap &data); static MsvcToolChain *readFromMap(const QVariantMap &data);
......
...@@ -45,6 +45,29 @@ static const char DISPLAY_NAME_KEY[] = "ProjectExplorer.ToolChain.DisplayName"; ...@@ -45,6 +45,29 @@ static const char DISPLAY_NAME_KEY[] = "ProjectExplorer.ToolChain.DisplayName";
static const char AUTODETECT_KEY[] = "ProjectExplorer.ToolChain.Autodetect"; static const char AUTODETECT_KEY[] = "ProjectExplorer.ToolChain.Autodetect";
static const char MKSPEC_KEY[] = "ProjectExplorer.ToolChain.MkSpecOverride"; static const char MKSPEC_KEY[] = "ProjectExplorer.ToolChain.MkSpecOverride";
namespace {
QString mkspecListToString(const QList<Utils::FileName> &specList)
{
QStringList result;
foreach (const Utils::FileName &spec, specList)
result.append(spec.toString());
return result.join(QChar::fromLatin1(';'));
}
QList<Utils::FileName> mkspecListFromString(const QString &string)
{
QList<Utils::FileName> result;
QStringList partList;
if (!string.isEmpty())
partList = string.split(QLatin1Char(';'));
foreach (const QString &part, partList)
result.append(Utils::FileName::fromString(part));
return result;
}
} // namespace
namespace ProjectExplorer { namespace ProjectExplorer {
namespace Internal { namespace Internal {
...@@ -76,7 +99,7 @@ public: ...@@ -76,7 +99,7 @@ public:
QString m_id; QString m_id;
bool m_autodetect; bool m_autodetect;
mutable QString m_displayName; mutable QString m_displayName;
Utils::FileName m_mkspec; QList<Utils::FileName> m_mkspecList;
}; };
} // namespace Internal } // namespace Internal
...@@ -143,19 +166,19 @@ QStringList ToolChain::restrictedToTargets() const ...@@ -143,19 +166,19 @@ QStringList ToolChain::restrictedToTargets() const
return QStringList(); return QStringList();
} }
Utils::FileName ToolChain::mkspec() const QList<Utils::FileName> ToolChain::mkspecList() const
{ {
if (d->m_mkspec.isEmpty()) if (d->m_mkspecList.isEmpty())
return suggestedMkspec(); return suggestedMkspecList();
return d->m_mkspec; return d->m_mkspecList;
} }
void ToolChain::setMkspec(const Utils::FileName &spec) void ToolChain::setMkspecList(const QList<Utils::FileName> &specList)
{ {
Utils::FileName oldSpecs = mkspec(); QList<Utils::FileName> oldSpecList = mkspecList();
d->m_mkspec = spec; d->m_mkspecList = specList;
if (oldSpecs != mkspec()) if (oldSpecList != mkspecList())
toolChainUpdated(); toolChainUpdated();
} }
...@@ -193,7 +216,7 @@ QVariantMap ToolChain::toMap() const ...@@ -193,7 +216,7 @@ QVariantMap ToolChain::toMap() const
result.insert(QLatin1String(ID_KEY), id()); result.insert(QLatin1String(ID_KEY), id());
result.insert(QLatin1String(DISPLAY_NAME_KEY), displayName()); result.insert(QLatin1String(DISPLAY_NAME_KEY), displayName());
result.insert(QLatin1String(AUTODETECT_KEY), isAutoDetected()); result.insert(QLatin1String(AUTODETECT_KEY), isAutoDetected());
result.insert(QLatin1String(MKSPEC_KEY), d->m_mkspec.toString()); result.insert(QLatin1String(MKSPEC_KEY), mkspecListToString(d->m_mkspecList));
return result; return result;
} }
...@@ -223,7 +246,7 @@ bool ToolChain::fromMap(const QVariantMap &data) ...@@ -223,7 +246,7 @@ bool ToolChain::fromMap(const QVariantMap &data)
// make sure we have new style ids: // make sure we have new style ids:
d->m_id = Internal::ToolChainPrivate::createId(data.value(QLatin1String(ID_KEY)).toString()); d->m_id = Internal::ToolChainPrivate::createId(data.value(QLatin1String(ID_KEY)).toString());
d->m_autodetect = data.value(QLatin1String(AUTODETECT_KEY), false).toBool(); d->m_autodetect = data.value(QLatin1String(AUTODETECT_KEY), false).toBool();
d->m_mkspec = Utils::FileName::fromString(data.value(QLatin1String(MKSPEC_KEY)).toString()); d->m_mkspecList = mkspecListFromString(data.value(QLatin1String(MKSPEC_KEY)).toString());
return true; return true;
} }
......
...@@ -88,9 +88,9 @@ public: ...@@ -88,9 +88,9 @@ public:
virtual void addToEnvironment(Utils::Environment &env) const = 0; virtual void addToEnvironment(Utils::Environment &env) const = 0;
virtual QString makeCommand() const = 0; virtual QString makeCommand() const = 0;
Utils::FileName mkspec() const; QList<Utils::FileName> mkspecList() const;
void setMkspec(const Utils::FileName &mkspec); void setMkspecList(const QList<Utils::FileName> &specList);
virtual Utils::FileName suggestedMkspec() const { return Utils::FileName(); } virtual QList<Utils::FileName> suggestedMkspecList() const { return QList<Utils::FileName>(); }
virtual Utils::FileName compilerCommand() const = 0; virtual Utils::FileName compilerCommand() const = 0;
virtual Utils::FileName debuggerCommand() const = 0; virtual Utils::FileName debuggerCommand() const = 0;
......
...@@ -45,24 +45,43 @@ ...@@ -45,24 +45,43 @@
#include <QtGui/QPushButton> #include <QtGui/QPushButton>
namespace { namespace {
const char DEFAULT_MKSPEC[] = "default"; const char DEFAULT_MKSPEC[] = "default";
Utils::FileName mkspecFromString(const QString &spec) QString mkspecListToString(const QList<Utils::FileName> &specList)
{ {
if (spec == QLatin1String(DEFAULT_MKSPEC)) QStringList specStrings;
return Utils::FileName(); foreach (const Utils::FileName &spec, specList) {
else if (spec.isEmpty())
return Utils::FileName::fromUserInput(spec); specStrings.append(QLatin1String(DEFAULT_MKSPEC));
else
specStrings.append(spec.toUserOutput());
}
QString specString = specStrings.join(QChar::fromAscii(';'));
if (specString.isEmpty())
return QLatin1String(DEFAULT_MKSPEC);
return specString;
} }
QString mkspecToString(const Utils::FileName spec) QList<Utils::FileName> mkspecListFromString(const QString &specString)
{ {
if (spec.isEmpty()) QStringList specList = specString.split(QLatin1Char(';'));
return QLatin1String(DEFAULT_MKSPEC); QList<Utils::FileName> result;
else foreach (const QString &spec, specList) {
return spec.toUserOutput(); QString trimmed = spec.trimmed();
if (trimmed == QLatin1String(DEFAULT_MKSPEC))
result.append(Utils::FileName());
else
result.append(Utils::FileName::fromUserInput(trimmed));
}
if (result.size() == 1 && result.at(0).isEmpty())
return QList<Utils::FileName>();
return result;
} }
} // namespace } // namespace
namespace ProjectExplorer { namespace ProjectExplorer {
...@@ -90,7 +109,7 @@ public: ...@@ -90,7 +109,7 @@ public:
QPushButton *m_mkspecResetButton; QPushButton *m_mkspecResetButton;
bool m_mkspecEdited; bool m_mkspecEdited;
QLabel *m_errorLabel; QLabel *m_errorLabel;
Utils::FileName m_suggestedMkspec; QList<Utils::FileName> m_suggestedMkspec;
}; };
} // namespace Internal } // namespace Internal
...@@ -127,17 +146,17 @@ void ToolChainConfigWidget::makeReadOnly() ...@@ -127,17 +146,17 @@ void ToolChainConfigWidget::makeReadOnly()
void ToolChainConfigWidget::emitDirty() void ToolChainConfigWidget::emitDirty()
{ {
if (d->m_mkspecEdit) if (d->m_mkspecEdit)
d->m_mkspecEdited = (mkspecFromString(d->m_mkspecEdit->text()) != d->m_suggestedMkspec); d->m_mkspecEdited = (mkspecListFromString(d->m_mkspecEdit->text()) != d->m_suggestedMkspec);
if (d->m_mkspecResetButton) if (d->m_mkspecResetButton)
d->m_mkspecResetButton->setEnabled(d->m_mkspecEdited); d->m_mkspecResetButton->setEnabled(d->m_mkspecEdited);
emit dirty(toolChain()); emit dirty(toolChain());
} }
void ToolChainConfigWidget::resetMkspec() void ToolChainConfigWidget::resetMkspecList()
{ {
if (!d->m_mkspecEdit || !d->m_mkspecEdited) if (!d->m_mkspecEdit || !d->m_mkspecEdited)
return; return;
d->m_mkspecEdit->setText(mkspecToString(d->m_suggestedMkspec)); d->m_mkspecEdit->setText(mkspecListToString(d->m_suggestedMkspec));
d->m_mkspecEdited = false; d->m_mkspecEdited = false;
} }
...@@ -211,34 +230,34 @@ void ToolChainConfigWidget::ensureMkspecEdit() ...@@ -211,34 +230,34 @@ void ToolChainConfigWidget::ensureMkspecEdit()
QTC_CHECK(!d->m_mkspecLayout); QTC_CHECK(!d->m_mkspecLayout);
QTC_CHECK(!d->m_mkspecResetButton); QTC_CHECK(!d->m_mkspecResetButton);
d->m_suggestedMkspec = d->m_toolChain->suggestedMkspec(); d->m_suggestedMkspec = d->m_toolChain->suggestedMkspecList();
d->m_mkspecLayout = new QHBoxLayout; d->m_mkspecLayout = new QHBoxLayout;
d->m_mkspecLayout->setMargin(0); d->m_mkspecLayout->setMargin(0);
d->m_mkspecEdit = new QLineEdit; d->m_mkspecEdit = new QLineEdit;
d->m_mkspecEdit->setWhatsThis(tr("All possible mkspecs separated by a semicolon (';')."));
d->m_mkspecResetButton = new QPushButton(tr("Reset")); d->m_mkspecResetButton = new QPushButton(t