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>
This commit is contained in:
Christian Stenger
2018-08-14 08:27:38 +02:00
parent 3ff33198bc
commit 7a8e6b052e

View File

@@ -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] {