forked from qt-creator/qt-creator
TestOutputReader: Report results directly through a signal
Instead of using future interface. The advantage is that signal is delivered synchronously now, in contrary to when future interface was used - it was queued into main event loop. Change-Id: Ic3d521c324c56b249515713c39bd09b9a924b6d3 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -74,7 +74,7 @@ void TestOutputReader::reportCrash()
|
||||
TestResult result = createDefaultResult();
|
||||
result.setDescription(Tr::tr("Test executable crashed."));
|
||||
result.setResult(ResultType::MessageFatal);
|
||||
m_futureInterface.reportResult(result);
|
||||
emit newResult(result);
|
||||
}
|
||||
|
||||
void TestOutputReader::createAndReportResult(const QString &message, ResultType type)
|
||||
@@ -109,7 +109,7 @@ void TestOutputReader::reportResult(const TestResult &result)
|
||||
{
|
||||
if (m_sanitizerResult.isValid())
|
||||
sendAndResetSanitizerResult();
|
||||
m_futureInterface.reportResult(result);
|
||||
emit newResult(result);
|
||||
m_hadValidOutput = true;
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ void TestOutputReader::sendAndResetSanitizerResult()
|
||||
}
|
||||
}
|
||||
|
||||
m_futureInterface.reportResult(m_sanitizerResult);
|
||||
emit newResult(m_sanitizerResult);
|
||||
m_hadValidOutput = true;
|
||||
m_sanitizerLines.clear();
|
||||
m_sanitizerResult = {};
|
||||
|
||||
Reference in New Issue
Block a user