forked from qt-creator/qt-creator
AutoTest: Fix output parsing for Quick Tests
Although Quick tests are using the output functionality of normal Qt tests some output messages are passed encoded differently which in turn results in failing XML parser. Handle the different encoding inside the output parser. Task-number: QTCREATORBUG-20105 Change-Id: Ib65edf46f9becff6f6bdef8b75f7761785bc4ceb Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -172,7 +172,9 @@ void QtTestOutputReader::processXMLOutput(const QByteArray &outputLine)
|
|||||||
if (m_className.isEmpty() && outputLine.trimmed().isEmpty())
|
if (m_className.isEmpty() && outputLine.trimmed().isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_xmlReader.addData(outputLine);
|
// avoid encoding problems for Quick tests
|
||||||
|
m_xmlReader.addData(m_testType == TestType::QuickTest ? QString::fromLatin1(outputLine)
|
||||||
|
: QString::fromLocal8Bit(outputLine));
|
||||||
while (!m_xmlReader.atEnd()) {
|
while (!m_xmlReader.atEnd()) {
|
||||||
if (m_futureInterface.isCanceled())
|
if (m_futureInterface.isCanceled())
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user