Merge remote-tracking branch 'origin/4.3'

Change-Id: I126f3a05212a3d5df78812e66285bc9e8078360b
This commit is contained in:
Orgad Shaneh
2017-06-20 11:30:21 +03:00
48 changed files with 3004 additions and 2039 deletions

View File

@@ -34,12 +34,14 @@
#include "testcodeparser.h"
#include <aggregation/aggregate.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/find/basetextfind.h>
#include <coreplugin/find/itemviewfind.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/projectexplorer.h>
#include <texteditor/texteditor.h>
#include <utils/theme/theme.h>
@@ -511,7 +513,9 @@ void TestResultsPane::onTestRunStarted()
m_testRunning = true;
m_stopTestRun->setEnabled(true);
m_runAll->setEnabled(false);
Core::ActionManager::command(Constants::ACTION_RUN_ALL_ID)->action()->setEnabled(false);
m_runSelected->setEnabled(false);
Core::ActionManager::command(Constants::ACTION_RUN_SELECTED_ID)->action()->setEnabled(false);
m_summaryWidget->setVisible(false);
}
@@ -519,8 +523,14 @@ void TestResultsPane::onTestRunFinished()
{
m_testRunning = false;
m_stopTestRun->setEnabled(false);
m_runAll->setEnabled(true);
m_runSelected->setEnabled(true);
const bool runEnabled = !ProjectExplorer::BuildManager::isBuilding()
&& TestTreeModel::instance()->hasTests()
&& TestTreeModel::instance()->parser()->state() == TestCodeParser::Idle;
m_runAll->setEnabled(runEnabled); // TODO unify Run* actions
Core::ActionManager::command(Constants::ACTION_RUN_ALL_ID)->action()->setEnabled(runEnabled);
m_runSelected->setEnabled(runEnabled);
Core::ActionManager::command(Constants::ACTION_RUN_SELECTED_ID)->action()->setEnabled(runEnabled);
updateSummaryLabel();
m_summaryWidget->setVisible(true);
m_model->removeCurrentTestMessage();
@@ -541,6 +551,7 @@ void TestResultsPane::updateRunActions()
QString whyNot;
TestTreeModel *model = TestTreeModel::instance();
const bool enable = !m_testRunning && !model->parser()->isParsing() && model->hasTests()
&& !ProjectExplorer::BuildManager::isBuilding()
&& ProjectExplorer::ProjectExplorerPlugin::canRunStartupProject(
ProjectExplorer::Constants::NORMAL_RUN_MODE, &whyNot);
m_runAll->setEnabled(enable);