CMakePM: Disable Add and Batch Edit buttons when the file-api parsing failed

For a project that failed to generate a valid CMake file-api reply
the manual added variables could be lost when the new state doesn't
result in a valid CMake file-api reply.

The user will have to edit the initial CMake parameters to generate
a valid CMake file-api reply.

Task-number: QTCREATORBUG-24637
Change-Id: I091a301ceee3cd41ec59b6282bb9515a49c1a366
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2021-03-22 19:30:05 +01:00
parent 1a4c7abb22
commit bc518cf353

View File

@@ -474,6 +474,9 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
this, [this]() {
if (m_buildConfiguration->isEnabled())
setError(QString());
m_batchEditButton->setEnabled(m_buildConfiguration->isEnabled());
m_addButton->setEnabled(m_buildConfiguration->isEnabled());
});
updateSelection();