AutoTest: Prefer ITestBase::type() to ITestBase::asTest*()

The casting provided by the asTest*() methods isn't made use of here, so
using the "data-oriented" type() method seems more expressive.

Change-Id: Ia3e1a28d126f096afed54eeb0d884c52332f4350
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Bernhard Beschow
2021-01-25 16:19:38 +01:00
parent e740295b8d
commit 2d92ae391a
2 changed files with 4 additions and 4 deletions

View File

@@ -374,7 +374,7 @@ void TestTreeModel::synchronizeTestTools()
QList<ITestTreeItem *> oldFrameworkRoots;
for (Utils::TreeItem *oldFrameworkRoot : *invisibleRoot) {
auto item = static_cast<ITestTreeItem *>(oldFrameworkRoot);
if (item->testBase()->asTestTool())
if (item->testBase()->type() == ITestBase::Tool)
oldFrameworkRoots.append(item);
}