forked from qt-creator/qt-creator
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:
@@ -547,7 +547,7 @@ void TestResultsPane::onCustomContextMenuRequested(const QPoint &pos)
|
|||||||
connect(action, &QAction::triggered, this, &TestResultsPane::onSaveWholeTriggered);
|
connect(action, &QAction::triggered, this, &TestResultsPane::onSaveWholeTriggered);
|
||||||
menu.addAction(action);
|
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 = new QAction(tr("Run This Test"), &menu);
|
||||||
action->setEnabled(correlatingItem && correlatingItem->canProvideTestConfiguration());
|
action->setEnabled(correlatingItem && correlatingItem->canProvideTestConfiguration());
|
||||||
connect(action, &QAction::triggered, this, [this, clicked] {
|
connect(action, &QAction::triggered, this, [this, clicked] {
|
||||||
|
Reference in New Issue
Block a user