Commit 1287b727 authored by Tobias Hunger's avatar Tobias Hunger

ToolChains: Allow to update kit with exactly one toolchain available

This was broken. Thanks to Philias on IRC for reporting this.

Change-Id: Icc91b8c307bf54e5e90cf017dfb9d7ae4fc31529
Reviewed-by: default avatarTim Jenssen <tim.jenssen@theqtcompany.com>
parent 750aeb91
......@@ -164,17 +164,14 @@ void ToolChainInformationConfigWidget::refresh()
{
m_ignoreChanges = true;
m_comboBox->clear();
m_comboBox->addItem(tr("<No compiler>"), QByteArray());
foreach (ToolChain *tc, ToolChainManager::toolChains())
m_comboBox->addItem(tc->displayName(), tc->id());
if (m_comboBox->count() == 0) {
m_comboBox->addItem(tr("<No compiler available>"), QString());
m_comboBox->setEnabled(false);
} else {
m_comboBox->setEnabled(m_comboBox->count() > 1 && !m_isReadOnly);
}
m_comboBox->setEnabled(m_comboBox->count() > 1 && !m_isReadOnly);
m_comboBox->setCurrentIndex(indexOf(ToolChainKitInformation::toolChain(m_kit)));
const int index = indexOf(ToolChainKitInformation::toolChain(m_kit));
m_comboBox->setCurrentIndex(index);
m_ignoreChanges = false;
}
......
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