aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/autotest
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2020-04-17 16:40:47 +0200
committerhjk <hjk@qt.io>2020-04-22 05:27:26 +0000
commit90fd6870c5a15ecc128116766bec30f673746750 (patch)
tree6b8f1dab4c182de447b6a6820c3a2dfb4d095442 /src/plugins/autotest
parentc22c1d96a59c68aa813abe44d965e916eb92b3e7 (diff)
AutoTest: Simplify QuickTestTreeItem::markForRemovalRecursively()
Change-Id: I3ab1876aa2d4dc04b9b5d53f373751e0f5241e75 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/autotest')
-rw-r--r--src/plugins/autotest/quick/quicktesttreeitem.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/plugins/autotest/quick/quicktesttreeitem.cpp b/src/plugins/autotest/quick/quicktesttreeitem.cpp
index 66a95c106e..5274a27099 100644
--- a/src/plugins/autotest/quick/quicktesttreeitem.cpp
+++ b/src/plugins/autotest/quick/quicktesttreeitem.cpp
@@ -430,15 +430,10 @@ QSet<QString> QuickTestTreeItem::internalTargets() const
void QuickTestTreeItem::markForRemovalRecursively(const QString &filePath)
{
- static const Core::Id id = Core::Id(Constants::FRAMEWORK_PREFIX).withSuffix(
- QuickTest::Constants::FRAMEWORK_NAME);
- TestTreeItem::markForRemovalRecursively(filePath);
- ITestFramework *framework = TestFrameworkManager::frameworkForId(id);
- QTC_ASSERT(framework, return);
- auto parser = dynamic_cast<QuickTestParser *>(framework->testParser());
+ auto parser = dynamic_cast<QuickTestParser *>(framework()->testParser());
const QString proFile = parser->projectFileForMainCppFile(filePath);
if (!proFile.isEmpty()) {
- TestTreeItem *root = framework->rootNode();
+ TestTreeItem *root = framework()->rootNode();
root->forAllChildren([proFile](TestTreeItem *it) {
if (it->proFile() == proFile)
it->markForRemoval(true);