forked from qt-creator/qt-creator
AutoTest: Fix handling of enabled state for code parser
Avoid unintentional re-enabling of the code parser. Handling of the enabled state broke several times before, therefore separate it from other states of the parser to avoid breaking it again when not taking enough care while refactoring or adding features related to states. Change-Id: If1eb0dd649225f10bfc3bf06f09851649da75983 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -115,7 +115,7 @@ TestNavigationWidget::~TestNavigationWidget()
|
||||
void TestNavigationWidget::contextMenuEvent(QContextMenuEvent *event)
|
||||
{
|
||||
const bool enabled = !TestRunner::instance()->isTestRunning()
|
||||
&& m_model->parser()->state() == TestCodeParser::Idle;
|
||||
&& m_model->parser()->enabled() && m_model->parser()->state() == TestCodeParser::Idle;
|
||||
const bool hasTests = m_model->hasTests();
|
||||
|
||||
QMenu menu;
|
||||
|
||||
Reference in New Issue
Block a user