diff options
Diffstat (limited to 'src/corelib/serialization/qxmlstream_p.h')
-rw-r--r-- | src/corelib/serialization/qxmlstream_p.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/corelib/serialization/qxmlstream_p.h b/src/corelib/serialization/qxmlstream_p.h index 330094f244..0ab92fe1a3 100644 --- a/src/corelib/serialization/qxmlstream_p.h +++ b/src/corelib/serialization/qxmlstream_p.h @@ -986,10 +986,10 @@ public: inline uint peekChar(); inline void putChar(uint c) { putStack.push() = c; } inline void putChar(QChar c) { putStack.push() = c.unicode(); } - void putString(const QString &s, int from = 0); - void putStringLiteral(const QString &s); - void putReplacement(const QString &s); - void putReplacementInAttributeValue(const QString &s); + void putString(QStringView s, qsizetype from = 0); + void putStringLiteral(QStringView s); + void putReplacement(QStringView s); + void putReplacementInAttributeValue(QStringView s); uint getChar_helper(); bool scanUntil(const char *str, short tokenToInject = -1); @@ -1919,12 +1919,8 @@ bool QXmlStreamReaderPrivate::parse() } break; case 244: { - if (uint s = resolveCharRef(3)) { - if (s >= 0xffff) - putStringLiteral(QString::fromUcs4(&s, 1)); - else - putChar((LETTER << 16) | s); - + if (char32_t s = resolveCharRef(3)) { + putStringLiteral(QChar::fromUcs4(s)); textBuffer.chop(3 + sym(3).len); clearSym(); } else { |