summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstringconverter.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-06-02 13:58:26 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-06-04 06:32:59 +0000
commitef1be84551ae1e131dbee8212fd1bd6064e889da (patch)
tree1293719bb17dbb187fd118abead659650bfe6972 /src/corelib/text/qstringconverter.h
parentf9fe3330181db7eef7eb8469ca7371517153f66b (diff)
QStringDecoder: add a char16_t overload of appendToBuffer(QChar*, ~~~)
More and more code in Qt uses char16_t instead of QChar, even QString::Data, so reduce the impedance mismatch with such code and supply a char16_t overload in parallel to the existing QChar* one. [ChangeLog][QtCore][QStringDecoder] Added appendToBuffer() overload for char16_t*, complementing the existing overload taking QChar*. Task-number: QTBUG-106198 Change-Id: I0cb8ab22c897c14b1318a676f5212cc0cf1b72b7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/text/qstringconverter.h')
-rw-r--r--src/corelib/text/qstringconverter.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/text/qstringconverter.h b/src/corelib/text/qstringconverter.h
index f10aa3b6d3..373c1ad1e9 100644
--- a/src/corelib/text/qstringconverter.h
+++ b/src/corelib/text/qstringconverter.h
@@ -140,6 +140,8 @@ public:
}
return iface->toUtf16(out, ba, &state);
}
+ char16_t *appendToBuffer(char16_t *out, QByteArrayView ba)
+ { return reinterpret_cast<char16_t *>(appendToBuffer(reinterpret_cast<QChar *>(out), ba)); }
Q_CORE_EXPORT static QStringDecoder decoderForHtml(QByteArrayView data);