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

@@ -635,7 +635,7 @@ void TestResultsPane::onCustomContextMenuRequested(const QPoint &pos)
action = new QAction(tr("Debug This Test"), &menu);
bool debugEnabled = false;
if (correlatingItem) {
if (correlatingItem->testBase()->asFramework()) {
if (correlatingItem->testBase()->type() == ITestBase::Framework) {
auto testTreeItem = static_cast<const TestTreeItem *>(correlatingItem);
debugEnabled = testTreeItem && testTreeItem->canProvideDebugConfiguration();
}