forked from qt-creator/qt-creator
CMakePM: Keep CMakePM error messages meaningful
If CMake project parsing is failing for some reason, it's better to keep the error message with the actual error than just replacing it with "The project was not parsed successfully." This error message was also issued when the project was loading, which is a bit misleading. In order to test this: 1. Set the build type to "" (nothing) 2. Clear CMake Configuration from menu 3. Run CMake This will re-configure the project with initial cmake parameters, but "-DCMAKE_BUILD_TYPE:STRING=" will set the build type to empty, and CMakePM would try to parse 'Release' and issue: "No 'Release' CMake configuration found". The commit resets the error message when the project is loaded. Change-Id: I1a586ec19f324d75a25e8f282cab02a6934fce2b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -472,7 +472,8 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
|
|||||||
this, &CMakeBuildSettingsWidget::updateFromKit);
|
this, &CMakeBuildSettingsWidget::updateFromKit);
|
||||||
connect(m_buildConfiguration, &CMakeBuildConfiguration::enabledChanged,
|
connect(m_buildConfiguration, &CMakeBuildConfiguration::enabledChanged,
|
||||||
this, [this]() {
|
this, [this]() {
|
||||||
setError(m_buildConfiguration->disabledReason());
|
if (m_buildConfiguration->isEnabled())
|
||||||
|
setError(QString());
|
||||||
});
|
});
|
||||||
|
|
||||||
updateSelection();
|
updateSelection();
|
||||||
|
Reference in New Issue
Block a user