forked from qt-creator/qt-creator
CMake: Improve emission of enabledChanged signals of build configurations
Change-Id: I542b93512466727ac4ee66a8ca41e503106ebdcb Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -145,7 +145,7 @@ void CMakeBuildConfiguration::ctor()
|
||||
connect(m_buildDirManager.get(), &BuildDirManager::dataAvailable,
|
||||
this, [this, project]() {
|
||||
project->updateProjectData(this);
|
||||
emit enabledChanged();
|
||||
clearError();
|
||||
emit dataAvailable();
|
||||
});
|
||||
connect(m_buildDirManager.get(), &BuildDirManager::errorOccured,
|
||||
@@ -153,7 +153,7 @@ void CMakeBuildConfiguration::ctor()
|
||||
connect(m_buildDirManager.get(), &BuildDirManager::configurationStarted,
|
||||
this, [this, project]() {
|
||||
project->handleParsingStarted();
|
||||
emit enabledChanged();
|
||||
clearError(ForceEnabledChanged::True);
|
||||
emit parsingStarted();
|
||||
});
|
||||
|
||||
@@ -176,6 +176,7 @@ bool CMakeBuildConfiguration::isParsing() const
|
||||
|
||||
void CMakeBuildConfiguration::resetData()
|
||||
{
|
||||
clearError();
|
||||
m_buildDirManager->resetData();
|
||||
}
|
||||
|
||||
@@ -342,12 +343,14 @@ void CMakeBuildConfiguration::setCurrentCMakeConfiguration(const QList<ConfigMod
|
||||
m_buildDirManager->forceReparse();
|
||||
}
|
||||
|
||||
void CMakeBuildConfiguration::clearError()
|
||||
void CMakeBuildConfiguration::clearError(ForceEnabledChanged fec)
|
||||
{
|
||||
if (!m_error.isEmpty()) {
|
||||
m_error.clear();
|
||||
emit enabledChanged();
|
||||
fec = ForceEnabledChanged::True;
|
||||
}
|
||||
if (fec == ForceEnabledChanged::True)
|
||||
emit enabledChanged();
|
||||
}
|
||||
|
||||
void CMakeBuildConfiguration::emitBuildTypeChanged()
|
||||
|
||||
Reference in New Issue
Block a user