Qbs: Fix reparsing after building

Change-Id: Ic06718ddc6813fbe02078976e4bc571fb382d96a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Tobias Hunger
2014-03-03 14:15:46 +01:00
parent 474065c5c7
commit 40d6a2bf57
2 changed files with 14 additions and 8 deletions

View File

@@ -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());

View File

@@ -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