AutoTest: Fix debugging of QuickTests

When using XML as output for QuickTests we get a special
message coming from QmlDebug before the XML document and
we are failing when trying to handle this as XML.
Ignore this message if it occurs before we have read anything.

Change-Id: I090aa33079bff99468b8ecd1abeac7ee7e948314
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2018-05-09 13:12:04 +02:00
parent 63ef88d015
commit 851d56cda2

View File

@@ -142,11 +142,14 @@ QtTestOutputReader::QtTestOutputReader(const QFutureInterface<TestResultPtr> &fu
void QtTestOutputReader::processOutput(const QByteArray &outputLine)
{
static const QByteArray qmlDebug = "QML Debugger: Waiting for connection on port";
switch (m_mode) {
case PlainText:
processPlainTextOutput(outputLine);
break;
case XML:
if (m_xmlReader.tokenType() == QXmlStreamReader::NoToken && outputLine.startsWith(qmlDebug))
return;
processXMLOutput(outputLine);
break;
}