forked from qt-creator/qt-creator
GccToolChain: Redetect ABIs if the targetAbi is invalid
Fixes issues with broken ABIs in the settings, like you get when going from QtCreator 4.2 to 4.1 and back. Task-number: QTCREATORBUG-16823 Change-Id: Ibcab5d3bc8255dfeb647e512f5db1d94155f9d9a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -617,10 +617,7 @@ IOutputParser *GccToolChain::outputParser() const
|
||||
|
||||
void GccToolChain::resetToolChain(const FileName &path)
|
||||
{
|
||||
if (path == m_compilerCommand)
|
||||
return;
|
||||
|
||||
bool resetDisplayName = displayName() == defaultDisplayName();
|
||||
bool resetDisplayName = (displayName() == defaultDisplayName());
|
||||
|
||||
setCompilerCommand(path);
|
||||
|
||||
@@ -710,14 +707,18 @@ bool GccToolChain::fromMap(const QVariantMap &data)
|
||||
m_platformLinkerFlags = data.value(QLatin1String(compilerPlatformLinkerFlagsKeyC)).toStringList();
|
||||
m_targetAbi = Abi(data.value(QLatin1String(targetAbiKeyC)).toString());
|
||||
m_originalTargetTriple = data.value(QLatin1String(originalTargetTripleKeyC)).toString();
|
||||
QStringList abiList = data.value(QLatin1String(supportedAbisKeyC)).toStringList();
|
||||
const QStringList abiList = data.value(QLatin1String(supportedAbisKeyC)).toStringList();
|
||||
m_supportedAbis.clear();
|
||||
foreach (const QString &a, abiList) {
|
||||
for (const QString &a : abiList) {
|
||||
Abi abi(a);
|
||||
if (!abi.isValid())
|
||||
continue;
|
||||
m_supportedAbis.append(abi);
|
||||
}
|
||||
|
||||
if (!m_targetAbi.isValid())
|
||||
resetToolChain(m_compilerCommand);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user