diff --git a/src/plugins/autotest/gtest/gtesttreeitem.cpp b/src/plugins/autotest/gtest/gtesttreeitem.cpp index dc53bd21dda..cd201cb9a46 100644 --- a/src/plugins/autotest/gtest/gtesttreeitem.cpp +++ b/src/plugins/autotest/gtest/gtesttreeitem.cpp @@ -327,5 +327,17 @@ QString GTestTreeItem::nameSuffix() const return suffix; } +QSet GTestTreeItem::internalTargets() const +{ + QSet result; + const auto cppMM = CppTools::CppModelManager::instance(); + const auto projectInfo = cppMM->projectInfo(ProjectExplorer::SessionManager::startupProject()); + for (const CppTools::ProjectPart::Ptr projectPart : projectInfo.projectParts()) { + if (projectPart->projectFile == proFile()) + result.insert(projectPart->buildSystemTarget); + } + return result; +} + } // namespace Internal } // namespace Autotest diff --git a/src/plugins/autotest/gtest/gtesttreeitem.h b/src/plugins/autotest/gtest/gtesttreeitem.h index 67973771dd5..60eb37b7f28 100644 --- a/src/plugins/autotest/gtest/gtesttreeitem.h +++ b/src/plugins/autotest/gtest/gtesttreeitem.h @@ -67,6 +67,7 @@ public: GTestTreeItem::TestStates state, const QString &proFile) const; QString nameSuffix() const; + QSet internalTargets() const override; private: GTestTreeItem::TestStates m_state;