Commit 4f80c9d0 authored by Tobias Hunger's avatar Tobias Hunger

GccToolChainConfigWidget: Keep custom ABIs

Do not override a custom ABI when a new set of supported ABIs is
detected.

Task-number: QTCREATORBUG-10582

Change-Id: I8476b520e80f39037240175cac135ad68752f725
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent a12a5c27
......@@ -939,9 +939,12 @@ QStringList GccToolChainConfigWidget::splitString(const QString &s)
void GccToolChainConfigWidget::handleCompilerCommandChange()
{
bool haveCompiler = false;
Abi currentAbi = m_abiWidget->currentAbi();
bool customAbi = m_abiWidget->isCustomAbi();
FileName path = m_compilerCommand->fileName();
QList<Abi> abiList;
bool haveCompiler = false;
if (!path.isEmpty()) {
QFileInfo fi(path.toFileInfo());
haveCompiler = fi.isExecutable() && fi.isFile();
......@@ -955,8 +958,15 @@ void GccToolChainConfigWidget::handleCompilerCommandChange()
splitString(m_platformCodeGenFlagsLineEdit->text()));
}
m_abiWidget->setEnabled(haveCompiler);
Abi currentAbi = m_abiWidget->currentAbi();
m_abiWidget->setAbis(abiList, abiList.contains(currentAbi) ? currentAbi : Abi());
// Find a good ABI for the new compiler:
Abi newAbi;
if (customAbi)
newAbi = currentAbi;
else if (abiList.contains(currentAbi))
newAbi = currentAbi;
m_abiWidget->setAbis(abiList, newAbi);
emit dirty();
}
......
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