forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user