Clang: Fix updating warning config widgets on remove

Problematic use case was:
 1. Go to projects mode, select "Clang Code Model"
 2. Click "Copy...", click "OK" and add e.g. " -Wbla"
 3. Click "Remove"
 ==> The configuration is reset (combobox), but the warning options are
     not (" -Wbla" is still there).

Change-Id: Ifc445a3fa0e3b3191915cf7bca220f4bef848069
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2016-04-15 12:02:10 +02:00
parent f18d32ee14
commit 9cc50a96e4

View File

@@ -157,10 +157,12 @@ void ClangDiagnosticConfigsWidget::syncConfigChooserToModel(const Core::Id &conf
connectConfigChooserCurrentIndex();
if (configToSelectIndex != -1)
if (configToSelectIndex != -1) {
m_ui->configChooserComboBox->setCurrentIndex(configToSelectIndex);
else if (previousCurrentIndex != m_ui->configChooserComboBox->currentIndex())
} else if (previousCurrentIndex != m_ui->configChooserComboBox->currentIndex()) {
syncOtherWidgetsToComboBox();
emit currentConfigChanged(currentConfigId());
}
}
void ClangDiagnosticConfigsWidget::syncOtherWidgetsToComboBox()