forked from qt-creator/qt-creator
AutoTest: Introduce ITestTool
Preparation for separating handling of code based and build system based tests. Task-number: QTCREATORBUG-23332 Change-Id: I490af5f3157fd4a8cd07d976cdfd9e4503ade97b Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -27,9 +27,11 @@
|
||||
|
||||
#include "autotesticons.h"
|
||||
#include "autotestplugin.h"
|
||||
#include "itestframework.h"
|
||||
#include "testeditormark.h"
|
||||
#include "testresultdelegate.h"
|
||||
#include "testresultmodel.h"
|
||||
#include "testresultmodel.h"
|
||||
#include "testrunner.h"
|
||||
#include "testsettings.h"
|
||||
#include "testtreemodel.h"
|
||||
@@ -631,9 +633,14 @@ void TestResultsPane::onCustomContextMenuRequested(const QPoint &pos)
|
||||
menu.addAction(action);
|
||||
|
||||
action = new QAction(tr("Debug This Test"), &menu);
|
||||
// FIXME limit to Test Frameworks
|
||||
auto testTreeItem = static_cast<const TestTreeItem *>(correlatingItem);
|
||||
action->setEnabled(testTreeItem && testTreeItem->canProvideDebugConfiguration());
|
||||
bool debugEnabled = false;
|
||||
if (correlatingItem) {
|
||||
if (correlatingItem->testBase()->asFramework()) {
|
||||
auto testTreeItem = static_cast<const TestTreeItem *>(correlatingItem);
|
||||
debugEnabled = testTreeItem && testTreeItem->canProvideDebugConfiguration();
|
||||
}
|
||||
}
|
||||
action->setEnabled(debugEnabled);
|
||||
connect(action, &QAction::triggered, this, [this, clicked] {
|
||||
onRunThisTestTriggered(TestRunMode::Debug, clicked);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user