AutoTest: Fix displaying description for XML output

CDATA is send in chunks and we lose possible newlines as
we handle the output line by line.
Add it explicitly while processing.

Change-Id: I36bad7f23e2b9b3a5ce9ec92d2d1cb6211dd43a6
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2021-07-08 16:56:01 +02:00
parent 7c56923704
commit 355a91f3e1

View File

@@ -196,6 +196,8 @@ void QtTestOutputReader::processXMLOutput(const QByteArray &outputLine)
break; break;
} }
} }
if (m_cdataMode == Description)
m_xmlReader.addData("\n");
m_xmlReader.addData(QString::fromUtf8(outputLine)); m_xmlReader.addData(QString::fromUtf8(outputLine));
while (!m_xmlReader.atEnd()) { while (!m_xmlReader.atEnd()) {
if (m_futureInterface.isCanceled()) if (m_futureInterface.isCanceled())