aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2019-04-04 13:31:06 +0200
committerChristian Stenger <christian.stenger@qt.io>2019-04-04 12:52:22 +0000
commitefbe62b389e1185f778c08d53c496bc552ff048e (patch)
tree65fcfb42f7a9a8ba5eb97b50a5bebf5a96c6eb6f
parentab26e9b6a566ca3660496d55cacce4abed22f278 (diff)
AutoTest: Fix handling of internal messages
When order results by applications is enabled some internal messages might end up in a wrong (or at least useless) position inside the results pane. For non-pure-global results we need to pass the id / application to avoid this. Change-Id: I4221326f9729547a1ee49eeb0ee4f82807444ae7 Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r--src/plugins/autotest/gtest/gtestoutputreader.cpp4
-rw-r--r--src/plugins/autotest/gtest/gtestresult.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/autotest/gtest/gtestoutputreader.cpp b/src/plugins/autotest/gtest/gtestoutputreader.cpp
index f1efb479a4..d66ab7700b 100644
--- a/src/plugins/autotest/gtest/gtestoutputreader.cpp
+++ b/src/plugins/autotest/gtest/gtestoutputreader.cpp
@@ -87,13 +87,13 @@ void GTestOutputReader::processOutputLine(const QByteArray &outputLineWithNewLin
m_description = line;
if (m_iteration > 1)
m_description.append(' ' + tr("(iteration %1)").arg(m_iteration));
- TestResultPtr testResult = TestResultPtr(new GTestResult(m_projectFile));
+ TestResultPtr testResult = TestResultPtr(new GTestResult(id(), m_projectFile, QString()));
testResult->setResult(Result::MessageInternal);
testResult->setDescription(m_description);
reportResult(testResult);
m_description.clear();
} else if (disabledTests.exactMatch(line)) {
- TestResultPtr testResult = TestResultPtr(new GTestResult(m_projectFile));
+ TestResultPtr testResult = TestResultPtr(new GTestResult(id(), m_projectFile, QString()));
testResult->setResult(Result::MessageDisabledTests);
int disabled = disabledTests.cap(1).toInt();
testResult->setDescription(tr("You have %n disabled test(s).", nullptr, disabled));
diff --git a/src/plugins/autotest/gtest/gtestresult.cpp b/src/plugins/autotest/gtest/gtestresult.cpp
index 06ef721951..51eb81a455 100644
--- a/src/plugins/autotest/gtest/gtestresult.cpp
+++ b/src/plugins/autotest/gtest/gtestresult.cpp
@@ -72,7 +72,7 @@ bool GTestResult::isDirectParentOf(const TestResult *other, bool *needsIntermedi
if (m_testSetName == gtOther->m_testSetName) {
const Result::Type otherResult = other->result();
if (otherResult == Result::MessageInternal || otherResult == Result::MessageLocation)
- return result() != Result::MessageLocation;
+ return result() != Result::MessageInternal && result() != Result::MessageLocation;
}
if (m_iteration != gtOther->m_iteration)
return false;