forked from qt-creator/qt-creator
AutoTest: Correct enabled state of context menu items
Permanently enable (De)Select All and allow triggering a rescan also if there is a build running. Task-number: QTCREATORBUG-19940 Change-Id: Ia0e8a5da135c3c59aba4ab179ae2970c25d470f3 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -117,7 +117,6 @@ void TestNavigationWidget::contextMenuEvent(QContextMenuEvent *event)
|
||||
const bool enabled = !ProjectExplorer::BuildManager::isBuilding()
|
||||
&& !TestRunner::instance()->isTestRunning()
|
||||
&& m_model->parser()->state() == TestCodeParser::Idle;
|
||||
const bool hasTests = m_model->hasTests();
|
||||
|
||||
QMenu menu;
|
||||
QAction *runThisTest = nullptr;
|
||||
@@ -172,10 +171,6 @@ void TestNavigationWidget::contextMenuEvent(QContextMenuEvent *event)
|
||||
connect(selectAll, &QAction::triggered, m_view, &TestTreeView::selectAll);
|
||||
connect(deselectAll, &QAction::triggered, m_view, &TestTreeView::deselectAll);
|
||||
|
||||
selectAll->setEnabled(enabled && hasTests);
|
||||
deselectAll->setEnabled(enabled && hasTests);
|
||||
rescan->setEnabled(enabled);
|
||||
|
||||
if (runThisTest) {
|
||||
menu.addAction(runThisTest);
|
||||
menu.addAction(runWithoutDeploy);
|
||||
|
||||
Reference in New Issue
Block a user