diff --git a/src/plugins/autotest/gtest/gtesttreeitem.cpp b/src/plugins/autotest/gtest/gtesttreeitem.cpp index 2d69f769f79..a85e09605cf 100644 --- a/src/plugins/autotest/gtest/gtesttreeitem.cpp +++ b/src/plugins/autotest/gtest/gtesttreeitem.cpp @@ -409,7 +409,7 @@ QSet GTestTreeItem::internalTargets() const && Utils::anyOf(projectPart->files, [&file] (const CppTools::ProjectFile &pf) { return pf.path == file; })) { - result.insert(projectPart->buildSystemTarget + '|' + projectPart->projectFile); + result.insert(projectPart->buildSystemTarget); if (projectPart->buildTargetType != CppTools::ProjectPart::Executable) result.unite(TestTreeItem::dependingInternalTargets(cppMM, file)); } diff --git a/src/plugins/autotest/quick/quicktesttreeitem.cpp b/src/plugins/autotest/quick/quicktesttreeitem.cpp index da0978c149d..68a844fbbca 100644 --- a/src/plugins/autotest/quick/quicktesttreeitem.cpp +++ b/src/plugins/autotest/quick/quicktesttreeitem.cpp @@ -382,7 +382,7 @@ QSet QuickTestTreeItem::internalTargets() const if (projectPart->buildTargetType != CppTools::ProjectPart::Executable) continue; if (projectPart->projectFile == proFile()) { - result.insert(projectPart->buildSystemTarget + '|' + projectPart->projectFile); + result.insert(projectPart->buildSystemTarget); break; } } diff --git a/src/plugins/autotest/testconfiguration.cpp b/src/plugins/autotest/testconfiguration.cpp index 6e26b910a33..09617d17a4a 100644 --- a/src/plugins/autotest/testconfiguration.cpp +++ b/src/plugins/autotest/testconfiguration.cpp @@ -148,13 +148,7 @@ void TestConfiguration::completeTestInformation(TestRunMode runMode) BuildTargetInfo targetInfo = Utils::findOrDefault(target->applicationTargets().list, [&buildSystemTargets] (const BuildTargetInfo &bti) { - return Utils::anyOf(buildSystemTargets, [&bti](const QString &b) { - const QStringList targWithProjectFile = b.split('|'); - if (targWithProjectFile.size() != 2) // some build targets might miss the project file - return false; - return !bti.targetFilePath.isEmpty() && targWithProjectFile.at(0) == bti.buildKey - && targWithProjectFile.at(1).startsWith(bti.projectFilePath.toString()); - }); + return buildSystemTargets.contains(bti.buildKey); }); // we might end up with an empty targetFilePath - e.g. when having a library we just link to // there would be no BuildTargetInfo that could match diff --git a/src/plugins/autotest/testtreeitem.cpp b/src/plugins/autotest/testtreeitem.cpp index 694e8e278a4..6d75efb4408 100644 --- a/src/plugins/autotest/testtreeitem.cpp +++ b/src/plugins/autotest/testtreeitem.cpp @@ -307,7 +307,7 @@ QSet TestTreeItem::internalTargets() const return TestTreeItem::dependingInternalTargets(cppMM, m_filePath); QSet targets; for (const CppTools::ProjectPart::Ptr part : projectParts) { - targets.insert(part->buildSystemTarget + '|' + part->projectFile); + targets.insert(part->buildSystemTarget); if (part->buildTargetType != CppTools::ProjectPart::Executable) targets.unite(TestTreeItem::dependingInternalTargets(cppMM, m_filePath)); } @@ -374,7 +374,7 @@ QSet TestTreeItem::dependingInternalTargets(CppTools::CppModelManager * wasHeader ? file : correspondingFile); for (const Utils::FileName &fn : dependingFiles) { for (const CppTools::ProjectPart::Ptr part : cppMM->projectPart(fn)) - result.insert(part->buildSystemTarget + '|' + part->projectFile); + result.insert(part->buildSystemTarget); } return result; }