diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-08-15 01:00:30 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-08-15 01:00:30 +0200 |
commit | c5c938055524b8b7e41ad361b0063f9ed1762044 (patch) | |
tree | 6f2961ef872e33679e02c0d0ef82334381db93f3 /qmake/generators | |
parent | 8bd48a1c335b404ebbeb7c09c859e0715e6b5cd4 (diff) | |
parent | 0d024bd0a63fa7a741f4f118a3b48806b695594f (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Id7954ada1f8658d3b1da5e8241a09f2d201a7c56
Diffstat (limited to 'qmake/generators')
-rw-r--r-- | qmake/generators/xmloutput.cpp | 10 |
1 files 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<text.count(); ++i) { - if (text.at(i) == QLatin1Char('&')) { + const QChar c = text.at(i); + if (c == QLatin1Char('&')) { if ( (i + 7) < text.count() && text.at(i + 1) == QLatin1Char('#') && text.at(i + 2) == QLatin1Char('x') && @@ -122,12 +123,15 @@ QString XmlOutput::doConversion(const QString &text) } else { output += QLatin1String("&"); } + } else if (c == QLatin1Char('<')) { + output += QLatin1String("<"); + } else if (c == QLatin1Char('>')) { + 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; } } } |