diff options
author | Christian Stenger <christian.stenger@qt.io> | 2016-11-08 16:00:21 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2016-11-14 09:57:25 +0000 |
commit | f967545c5aa992146138a12c85fbf8bce450feaf (patch) | |
tree | b46b3641832f32ab1af5c2654eabfa6d40926d2e /src/plugins/autotest/autotestplugin.cpp | |
parent | b5f587efb540cff5f51052a6e30be3139d8b930d (diff) |
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>
Diffstat (limited to 'src/plugins/autotest/autotestplugin.cpp')
-rw-r--r-- | src/plugins/autotest/autotestplugin.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/autotest/autotestplugin.cpp b/src/plugins/autotest/autotestplugin.cpp index 976bee11c8..f6e12685fb 100644 --- a/src/plugins/autotest/autotestplugin.cpp +++ b/src/plugins/autotest/autotestplugin.cpp @@ -178,6 +178,7 @@ void AutotestPlugin::onRunSelectedTriggered() void AutotestPlugin::updateMenuItemsEnabledState() { const bool enabled = !TestRunner::instance()->isTestRunning() + && TestTreeModel::instance()->parser()->enabled() && TestTreeModel::instance()->parser()->state() == TestCodeParser::Idle; const bool hasTests = TestTreeModel::instance()->hasTests(); |