diff options
author | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-04-10 15:09:45 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-04-10 16:24:57 +0300 |
commit | f1b240d004578d54b6497a910098566022c8edb0 (patch) | |
tree | e616782d77b8f23cd39f8287f976579e31fc6f65 | |
parent | 4fb458c9e739283c5d77bff67d08dcba935d6984 (diff) | |
download | qt-creator-f1b240d004578d54b6497a910098566022c8edb0.tar.gz |
Disable context menu entries while parsing
Change-Id: Ib562ed00065fedd94fdaed0edb11b0fa62a18de5
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
-rw-r--r-- | plugins/autotest/testcodeparser.h | 1 | ||||
-rw-r--r-- | plugins/autotest/testnavigationwidget.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/plugins/autotest/testcodeparser.h b/plugins/autotest/testcodeparser.h index f4894e9674..1b8215fe50 100644 --- a/plugins/autotest/testcodeparser.h +++ b/plugins/autotest/testcodeparser.h @@ -55,6 +55,7 @@ public: explicit TestCodeParser(TestTreeModel *parent = 0); virtual ~TestCodeParser(); void setState(State state); + State state() const { return m_parserState; } #ifdef WITH_TESTS int autoTestsCount() const; diff --git a/plugins/autotest/testnavigationwidget.cpp b/plugins/autotest/testnavigationwidget.cpp index df2f0dcdd0..f9847a5782 100644 --- a/plugins/autotest/testnavigationwidget.cpp +++ b/plugins/autotest/testnavigationwidget.cpp @@ -86,7 +86,8 @@ TestNavigationWidget::~TestNavigationWidget() void TestNavigationWidget::contextMenuEvent(QContextMenuEvent *event) { - const bool enabled = !TestRunner::instance()->isTestRunning(); + const bool enabled = !TestRunner::instance()->isTestRunning() + && m_model->parser()->state() == TestCodeParser::Idle; const bool hasTests = m_model->hasTests(); QMenu menu; QAction *runAll = Core::ActionManager::command(Constants::ACTION_RUN_ALL_ID)->action(); |