summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtexthtmlparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qtexthtmlparser.cpp')
-rw-r--r--src/gui/text/qtexthtmlparser.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp
index 0c8a29c6be..be82578f5c 100644
--- a/src/gui/text/qtexthtmlparser.cpp
+++ b/src/gui/text/qtexthtmlparser.cpp
@@ -835,14 +835,7 @@ QString QTextHtmlParser::parseEntity()
if (ok) {
if (uc >= 0x80 && uc < 0x80 + (sizeof(windowsLatin1ExtendedCharacters)/sizeof(windowsLatin1ExtendedCharacters[0])))
uc = windowsLatin1ExtendedCharacters[uc - 0x80];
- QString str;
- if (QChar::requiresSurrogates(uc)) {
- str += QChar(QChar::highSurrogate(uc));
- str += QChar(QChar::lowSurrogate(uc));
- } else {
- str = QChar(uc);
- }
- return str;
+ return QStringView{QChar::fromUcs4(uc)}.toString();
}
}
}