From 7f4f346e51b0479a0ab0b927e586e6c626028b4b Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 7 Aug 2019 10:57:31 +0200 Subject: Fix escaping of < and > in QMake's XML generator Having those characters in QMAKE_EXTRA_COMPILERS broke the generated VS project file. They must be replaced by XML entities. Fixes: QTBUG-1935 Change-Id: Iff1edbeabec4cedef777071682412970b7769f19 Reviewed-by: Oliver Wolff --- qmake/generators/xmloutput.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/qmake/generators/xmloutput.cpp b/qmake/generators/xmloutput.cpp index e92749a126..5d96128442 100644 --- a/qmake/generators/xmloutput.cpp +++ b/qmake/generators/xmloutput.cpp @@ -113,7 +113,8 @@ QString XmlOutput::doConversion(const QString &text) // this is a way to escape characters that shouldn't be converted for (int i=0; i')) { + output += QLatin1String(">"); } else { - QChar c = text.at(i); if (c.unicode() < 0x20) { output += QString("&#x%1;").arg(c.unicode(), 2, 16, QLatin1Char('0')); } else { - output += text.at(i); + output += c; } } } -- cgit v1.2.3