forked from qt-creator/qt-creator
CMake: Disable BC if there is an error during initial cmake run
* Disable the BC and give report the cmake error * Show a warning label in the BC Change-Id: If5737d033fa2682c264ab7ac1189c59947e3b28d Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -81,6 +81,16 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(ProjectExplorer::Target *parent
|
||||
displayName(), BuildConfiguration::Unknown));
|
||||
}
|
||||
|
||||
bool CMakeBuildConfiguration::isEnabled() const
|
||||
{
|
||||
return m_error.isEmpty();
|
||||
}
|
||||
|
||||
QString CMakeBuildConfiguration::disabledReason() const
|
||||
{
|
||||
return error();
|
||||
}
|
||||
|
||||
CMakeBuildConfiguration::CMakeBuildConfiguration(ProjectExplorer::Target *parent,
|
||||
CMakeBuildConfiguration *source) :
|
||||
BuildConfiguration(parent, source),
|
||||
@@ -160,6 +170,20 @@ CMakeConfig CMakeBuildConfiguration::cmakeConfiguration() const
|
||||
return m_configuration;
|
||||
}
|
||||
|
||||
void CMakeBuildConfiguration::setError(const QString &message)
|
||||
{
|
||||
if (m_error == message)
|
||||
return;
|
||||
m_error = message;
|
||||
emit enabledChanged();
|
||||
emit errorOccured(m_error);
|
||||
}
|
||||
|
||||
QString CMakeBuildConfiguration::error() const
|
||||
{
|
||||
return m_error;
|
||||
}
|
||||
|
||||
ProjectExplorer::NamedWidget *CMakeBuildConfiguration::createConfigWidget()
|
||||
{
|
||||
return new CMakeBuildSettingsWidget(this);
|
||||
|
||||
Reference in New Issue
Block a user