forked from qt-creator/qt-creator
Qbs: Fix reparsing after building
Change-Id: Ic06718ddc6813fbe02078976e4bc571fb382d96a Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -362,6 +362,12 @@ void QbsProject::buildConfigurationChanged(BuildConfiguration *bc)
|
||||
|
||||
void QbsProject::startParsing()
|
||||
{
|
||||
// Qbs does update the build graph during the build. So we cannot
|
||||
// start to parse while a build is running or we will lose information.
|
||||
// Just return since the qbsbuildstep will trigger a reparse after the build.
|
||||
if (ProjectExplorer::BuildManager::isBuilding(this))
|
||||
return;
|
||||
|
||||
parseCurrentBuildConfiguration(false);
|
||||
}
|
||||
|
||||
@@ -383,12 +389,6 @@ void QbsProject::parseCurrentBuildConfiguration(bool force)
|
||||
if (!m_forceParsing)
|
||||
m_forceParsing = force;
|
||||
|
||||
// Qbs does update the build graph during the build. So we cannot
|
||||
// start to parse while a build is running or we will lose information.
|
||||
// Just return since the qbsbuildstep will trigger a reparse after the build.
|
||||
if (ProjectExplorer::BuildManager::isBuilding(this))
|
||||
return;
|
||||
|
||||
if (!activeTarget())
|
||||
return;
|
||||
QbsBuildConfiguration *bc = qobject_cast<QbsBuildConfiguration *>(activeTarget()->activeBuildConfiguration());
|
||||
|
||||
@@ -476,8 +476,14 @@ void QbsProjectManagerPlugin::buildProducts(QbsProject *project, const QStringLi
|
||||
|
||||
void QbsProjectManagerPlugin::reparseCurrentProject()
|
||||
{
|
||||
if (m_currentProject)
|
||||
m_currentProject->parseCurrentBuildConfiguration(true);
|
||||
if (!m_currentProject || BuildManager::isBuilding(m_currentProject)) {
|
||||
// Qbs does update the build graph during the build. So we cannot
|
||||
// start to parse while a build is running or we will lose information.
|
||||
// Just return since the qbsbuildstep will trigger a reparse after the build.
|
||||
return;
|
||||
}
|
||||
|
||||
m_currentProject->parseCurrentBuildConfiguration(true);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user