forked from qt-creator/qt-creator
CppTools: Add target type information to project part
Let project managers store information whether a project part belongs to an executable or a library and use this information inside the AutoTest plugin. This information will help to determine which targets are relevant for the execution of tests. Change-Id: I93b42797bf55225425398dc83aecea3c99eea290 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -288,8 +288,11 @@ QSet<QString> TestTreeItem::internalTargets() const
|
||||
auto cppMM = CppTools::CppModelManager::instance();
|
||||
const QList<CppTools::ProjectPart::Ptr> projectParts = cppMM->projectPart(filePath());
|
||||
QSet<QString> targets;
|
||||
for (const CppTools::ProjectPart::Ptr part : projectParts)
|
||||
for (const CppTools::ProjectPart::Ptr part : projectParts) {
|
||||
if (part->buildTargetType != CppTools::ProjectPart::Executable)
|
||||
continue;
|
||||
targets.insert(part->buildSystemTarget + '|' + part->projectFile);
|
||||
}
|
||||
return targets;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user