From 7a8e6b052ee01cfcd20fd0752749349421da719f Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 14 Aug 2018 08:27:38 +0200 Subject: 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 --- src/plugins/autotest/testresultspane.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] { -- cgit v1.2.1