AutoTest: Fix handling of test results

Broke with d05c5b7d07. The id is
used to identify the application running a test or a global
message like some warnings or the information regarding the
current running test.
Fixes its usage and its display inside the results pane.

In the amended patch the assumption that if the m_id is empty
it corresponds to nullptr TestResultPtr was apparently wrong.
This patch fixes it so that the default c'tor of TestResult
always creates an invalid result, so that it corresponds now
to nullptr TestResultPtr.

Amends d05c5b7d07

Change-Id: I9949aec3fc2b7354de149433b7127933f2d9bf21
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Stenger
2023-02-15 16:25:16 +01:00
committed by Jarek Kobus
parent 31740f562c
commit ac2d5d761d
5 changed files with 16 additions and 14 deletions

View File

@@ -784,7 +784,7 @@ void TestRunner::onFinished()
void TestRunner::reportResult(ResultType type, const QString &description)
{
TestResult result("internal", {});
TestResult result({}, {});
result.setResult(type);
result.setDescription(description);
emit testResultReady(result);