Commit 420c9b42 authored by Tobias Hunger's avatar Tobias Hunger

toolchain: Make Id more unique

Take debugger into account when generating an Id. This fixes issues
with creator switching to the wrong tool chain when loading a project

Task-number: QTCREATORBUG-4295
Reviewed-by: dt
parent 7ce17490
......@@ -288,7 +288,9 @@ void GccToolChain::updateId()
{
QString i = id();
i = i.left(i.indexOf(QLatin1Char(':')));
setId(QString::fromLatin1("%1:%2.%3").arg(i).arg(m_compilerPath).arg(m_targetAbi.toString()));
setId(QString::fromLatin1("%1:%2.%3.%4")
.arg(i).arg(m_compilerPath)
.arg(m_targetAbi.toString()).arg(m_debuggerCommand));
}
QString GccToolChain::typeName() const
......
......@@ -363,8 +363,8 @@ MsvcToolChain::MsvcToolChain(const QString &name, const Abi &abi,
Q_ASSERT(abi.binaryFormat() == Abi::PEFormat);
Q_ASSERT(abi.osFlavor() != Abi::WindowsMSysFlavor);
setId(QString::fromLatin1("%1:%2.%3").arg(Constants::MSVC_TOOLCHAIN_ID).arg(m_varsBat)
.arg(m_varsBatArg));
setId(QString::fromLatin1("%1:%2.%3.%4").arg(Constants::MSVC_TOOLCHAIN_ID).arg(m_varsBat)
.arg(m_varsBatArg).arg(m_debuggerCommand));
setDisplayName(name);
}
......
......@@ -208,7 +208,8 @@ int MaemoToolChain::qtVersionId() const
void MaemoToolChain::updateId()
{
setId(QString::fromLatin1("%1:%2").arg(Constants::MAEMO_TOOLCHAIN_ID).arg(m_qtVersionId));
setId(QString::fromLatin1("%1:%2.%3").arg(Constants::MAEMO_TOOLCHAIN_ID)
.arg(m_qtVersionId).arg(debuggerCommand()));
}
// --------------------------------------------------------------------------
......
......@@ -91,6 +91,19 @@ static Utils::Environment baseEnvironment(RvctToolChain *tc)
return result;
}
static QString toString(const RvctToolChain::ArmVersion &v)
{
switch (v)
{
case RvctToolChain::ARMv5:
return QString::fromAscii("armv5");
case RvctToolChain::ARMv6:
return QString::fromAscii("armv6");
default:
return QString::fromAscii("unknown");
}
}
// ==========================================================================
// RvctToolChain
// ==========================================================================
......@@ -349,7 +362,8 @@ bool RvctToolChain::fromMap(const QVariantMap &data)
void RvctToolChain::updateId()
{
setId(QString::fromLatin1("%1:%2").arg(Constants::RVCT_TOOLCHAIN_ID).arg(m_compilerPath));
setId(QString::fromLatin1("%1:%2.%3.%4").arg(Constants::RVCT_TOOLCHAIN_ID)
.arg(m_compilerPath).arg(toString(m_armVersion)).arg(m_debuggerCommand));
}
QString RvctToolChain::varName(const QString &postFix) const
......
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