aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2018-08-14 08:27:38 +0200
committerChristian Stenger <christian.stenger@qt.io>2018-08-20 06:26:48 +0000
commit7a8e6b052ee01cfcd20fd0752749349421da719f (patch)
tree0177e9bc9df467d85c13fbf9bf0135d0cc778bb6 /src
parent3ff33198bcf8b426022fd4d50ad0affdbc7edd2a (diff)
AutoTest: Disable run related items while executing tests
While executing tests it had been possible to trigger another run when using the context menu on one of the result items inside the results pane. Prohibit it at first hand instead of running into a soft assert later on. Change-Id: Ib5a4ca53a2605d12f6539fd68aee099211f12174 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/autotest/testresultspane.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/autotest/testresultspane.cpp b/src/plugins/autotest/testresultspane.cpp
index 3047e6d710..66701a0aa4 100644
--- a/src/plugins/autotest/testresultspane.cpp
+++ b/src/plugins/autotest/testresultspane.cpp
@@ -547,7 +547,7 @@ void TestResultsPane::onCustomContextMenuRequested(const QPoint &pos)
connect(action, &QAction::triggered, this, &TestResultsPane::onSaveWholeTriggered);
menu.addAction(action);
- const auto correlatingItem = clicked ? clicked->findTestTreeItem() : nullptr;
+ const auto correlatingItem = (enabled && clicked) ? clicked->findTestTreeItem() : nullptr;
action = new QAction(tr("Run This Test"), &menu);
action->setEnabled(correlatingItem && correlatingItem->canProvideTestConfiguration());
connect(action, &QAction::triggered, this, [this, clicked] {