AutoTest: add ITestBase::type() for better readability

Change-Id: I67133f4940329483f2d8d25d1212f4e07f57d39d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2020-11-25 08:18:55 +01:00
parent a3857a996a
commit 7853c6ba4d
7 changed files with 25 additions and 18 deletions

View File

@@ -154,8 +154,9 @@ void TestNavigationWidget::contextMenuEvent(QContextMenuEvent *event)
onRunThisTestTriggered(TestRunMode::RunWithoutDeploy);
});
}
auto ttitem = item->testBase()->asFramework() ? static_cast<TestTreeItem *>(item)
: nullptr;
auto ttitem = item->testBase()->type() == ITestBase::Framework
? static_cast<TestTreeItem *>(item)
: nullptr;
if (ttitem && ttitem->canProvideDebugConfiguration()) {
debugThisTest = new QAction(tr("Debug This Test"), &menu);
debugThisTest->setEnabled(enabled);