QbsProjectManager: Fix forced reparse functionality

Amends 67b51d1505, which had the
unintended side effect of discarding the build graph.

Change-Id: Ic01e85563ef177df58ca3df71d9fea30febf6fa6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2024-12-20 15:17:29 +01:00
parent 6c904d03b6
commit ec8d737704

View File

@@ -612,8 +612,10 @@ void QbsProjectManagerPlugin::reparseProject(QbsProject *project)
if (!t)
return;
if (auto bs = qobject_cast<QbsBuildSystem *>(t->buildSystem()))
bs->scheduleParsing({{Constants::QBS_RESTORE_BEHAVIOR_KEY, "resolve-only"}});
if (auto bs = qobject_cast<QbsBuildSystem *>(t->buildSystem());
bs && bs->session()->apiLevel() >= 8) {
bs->scheduleParsing({{Constants::QBS_RESTORE_BEHAVIOR_KEY, "restore-and-resolve"}});
}
}
void buildNamedProduct(QbsProject *project, const QString &product)