forked from qt-creator/qt-creator
Disable context menu entries while parsing
Change-Id: Ib562ed00065fedd94fdaed0edb11b0fa62a18de5 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -55,6 +55,7 @@ public:
|
|||||||
explicit TestCodeParser(TestTreeModel *parent = 0);
|
explicit TestCodeParser(TestTreeModel *parent = 0);
|
||||||
virtual ~TestCodeParser();
|
virtual ~TestCodeParser();
|
||||||
void setState(State state);
|
void setState(State state);
|
||||||
|
State state() const { return m_parserState; }
|
||||||
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
int autoTestsCount() const;
|
int autoTestsCount() const;
|
||||||
|
@@ -86,7 +86,8 @@ TestNavigationWidget::~TestNavigationWidget()
|
|||||||
|
|
||||||
void TestNavigationWidget::contextMenuEvent(QContextMenuEvent *event)
|
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();
|
const bool hasTests = m_model->hasTests();
|
||||||
QMenu menu;
|
QMenu menu;
|
||||||
QAction *runAll = Core::ActionManager::command(Constants::ACTION_RUN_ALL_ID)->action();
|
QAction *runAll = Core::ActionManager::command(Constants::ACTION_RUN_ALL_ID)->action();
|
||||||
|
Reference in New Issue
Block a user