Enable 'Run *' buttons only if tests are available

This commit is contained in:
Christian Stenger
2014-11-04 13:42:38 +01:00
committed by Christian Stenger
parent d5913658b2
commit 87e5cf87e1
5 changed files with 18 additions and 4 deletions

View File

@@ -331,6 +331,9 @@ void performTestRun(QFutureInterface<void> &future, const QList<TestConfiguratio
void TestRunner::runTests()
{
// clear old log and output pane
TestResultsPane::instance()->clearContents();
if (m_selectedTests.empty()) {
TestResultsPane::instance()->addTestResult(
TestResult(QString(), QString(), QString(), ResultType::MESSAGE_FATAL,
@@ -339,7 +342,6 @@ void TestRunner::runTests()
}
ProjectExplorer::Project *project = m_selectedTests.at(0)->project();
if (!project) // add a warning or info to output? possible at all?
return;
@@ -365,9 +367,6 @@ void TestRunner::runTests()
}
}
// clear old log and output pane
TestResultsPane::instance()->clearContents();
emit testRunStarted();
QFuture<void> future = QtConcurrent::run(&performTestRun , m_selectedTests);
Core::FutureProgress *progress = Core::ProgressManager::addTask(future, tr("Running Tests"),