forked from qt-creator/qt-creator
Enable 'Run *' buttons only if tests are available
This commit is contained in:
committed by
Christian Stenger
parent
d5913658b2
commit
87e5cf87e1
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user