AutoTest: Fix enabling run buttons

If a parsing for tests is in progress the buttons might get enabled
but they should be disabled until the parsing has finished.

Change-Id: I3f089626983c219a9b54d8fc057a7ff51f11dc8c
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
Christian Stenger
2016-03-14 15:36:03 +01:00
parent 7e03cbd8a0
commit 507a7e89eb
2 changed files with 4 additions and 1 deletions

View File

@@ -31,6 +31,7 @@
#include "testrunner.h"
#include "testsettings.h"
#include "testtreemodel.h"
#include "testcodeparser.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
@@ -517,7 +518,8 @@ void TestResultsPane::onScrollBarRangeChanged(int, int max)
void TestResultsPane::updateRunActions()
{
QString whyNot;
const bool enable = TestTreeModel::instance()->hasTests()
TestTreeModel *model = TestTreeModel::instance();
const bool enable = !model->parser()->isParsing() && model->hasTests()
&& ProjectExplorer::ProjectExplorerPlugin::canRunStartupProject(
ProjectExplorer::Constants::NORMAL_RUN_MODE, &whyNot);
m_runAll->setEnabled(enable);