forked from qt-creator/qt-creator
CMakePM: Fix having duplicate CMAKE_CXX_COMPILERS entries
Do not apply the changes directly to the model, cache and then apply at the right time. Fixes: QTCREATORBUG-27005 Change-Id: Id099f21196900cd0e9787ac27887f2eec36f8045 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -158,6 +158,7 @@ private:
|
||||
|
||||
QPushButton *m_batchEditButton = nullptr;
|
||||
QPushButton *m_kitConfiguration = nullptr;
|
||||
CMakeConfig m_configurationChanges;
|
||||
};
|
||||
|
||||
static QModelIndex mapToSource(const QAbstractItemView *view, const QModelIndex &idx)
|
||||
@@ -416,6 +417,11 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
|
||||
updateButtonState();
|
||||
m_showProgressTimer.stop();
|
||||
m_progressIndicator->hide();
|
||||
|
||||
if (!m_configurationChanges.isEmpty()) {
|
||||
m_configModel->setBatchEditConfiguration(m_configurationChanges);
|
||||
m_configurationChanges.clear();
|
||||
}
|
||||
updateConfigurationStateSelection();
|
||||
});
|
||||
|
||||
@@ -502,8 +508,9 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
|
||||
connect(bs, &CMakeBuildSystem::warningOccurred,
|
||||
this, &CMakeBuildSettingsWidget::setWarning);
|
||||
|
||||
connect(bs, &CMakeBuildSystem::configurationChanged,
|
||||
m_configModel, &ConfigModel::setBatchEditConfiguration);
|
||||
connect(bs, &CMakeBuildSystem::configurationChanged, this, [this](const CMakeConfig &config) {
|
||||
m_configurationChanges = config;
|
||||
});
|
||||
|
||||
updateFromKit();
|
||||
connect(m_buildConfig->target(), &Target::kitChanged,
|
||||
|
Reference in New Issue
Block a user