QbsPM: Pass enabled information to code model

If a project part is not enabled let the code model know
about it as others may refer to this information as well.
Fixes an issue with the AutoTest plugin when it tries
to run a test for which no build targets will be generated
at all as it is disabled by some condition.

Change-Id: I342e8dde0a171084894ec59fdb462d7e9526c8db
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Christian Stenger
2020-03-18 09:29:10 +01:00
parent 5a562bd9b1
commit 4fefbbcb66

View File

@@ -919,6 +919,7 @@ static RawProjectParts generateProjectParts(
rpp.setBuildTargetType(prd.value("is-runnable").toBool() rpp.setBuildTargetType(prd.value("is-runnable").toBool()
? BuildTargetType::Executable ? BuildTargetType::Executable
: BuildTargetType::Library); : BuildTargetType::Library);
rpp.setSelectedForBuilding(grp.value("is-enabled").toBool());
QHash<QString, QJsonObject> filePathToSourceArtifact; QHash<QString, QJsonObject> filePathToSourceArtifact;
bool hasCFiles = false; bool hasCFiles = false;