forked from qt-creator/qt-creator
AbiWidget: Do not forget custom ABI
Do not forget custom ABI when switching to a supported ABI and back. Change-Id: Ie44f2b22727607c61aa3940a3ab4620e4e5a5ac1 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -148,7 +148,15 @@ void AbiWidget::setAbis(const QList<Abi> &abiList, const Abi ¤t)
|
||||
bool blocked = blockSignals(true);
|
||||
d->m_abi->clear();
|
||||
|
||||
d->m_abi->addItem(tr("<custom>"), QLatin1String("custom"));
|
||||
Abi defaultAbi = current;
|
||||
if (defaultAbi.isNull()) {
|
||||
if (!abiList.isEmpty())
|
||||
defaultAbi = abiList.at(0);
|
||||
else
|
||||
defaultAbi = Abi::hostAbi();
|
||||
}
|
||||
|
||||
d->m_abi->addItem(tr("<custom>"), defaultAbi.toString());
|
||||
d->m_abi->setCurrentIndex(0);
|
||||
|
||||
for (int i = 0; i < abiList.count(); ++i) {
|
||||
@@ -198,10 +206,8 @@ void AbiWidget::modeChanged()
|
||||
d->m_binaryFormatComboBox->setEnabled(customMode);
|
||||
d->m_wordWidthComboBox->setEnabled(customMode);
|
||||
|
||||
if (!customMode) {
|
||||
Abi current(d->m_abi->itemData(d->m_abi->currentIndex()).toString());
|
||||
setCustomAbi(current);
|
||||
}
|
||||
}
|
||||
|
||||
void AbiWidget::customAbiChanged()
|
||||
@@ -238,6 +244,7 @@ void AbiWidget::setCustomAbi(const Abi ¤t)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (d->m_abi->currentIndex() == 0)
|
||||
d->m_abi->setItemData(0, current.toString());
|
||||
blockSignals(blocked);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user