forked from qt-creator/qt-creator
QbsProjectManager: Do not reparse the project after every build.
While it is true that additional information about target artifacts can appear during a build, this data is already present in the qbs::Project object and can simply be retrieved. No reparsing is necessary. The exception is when reparsing was requested while the build was going on. In that case, we really need to do it after the build has finished. Change-Id: Ief3797782ad0ca5651974d4b5d3d64e1199ca9a5 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
@@ -514,14 +514,15 @@ void QbsProjectManagerPlugin::reparseCurrentProject()
|
||||
|
||||
void QbsProjectManagerPlugin::reparseProject(QbsProject *project)
|
||||
{
|
||||
if (!project || BuildManager::isBuilding(project)) {
|
||||
// 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 (!project)
|
||||
return;
|
||||
}
|
||||
|
||||
project->parseCurrentBuildConfiguration(true);
|
||||
// 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.
|
||||
if (BuildManager::isBuilding(project))
|
||||
project->scheduleParsing();
|
||||
else
|
||||
project->parseCurrentBuildConfiguration(true);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user