diff --git a/src/corelib/text/qstringconverter.cpp b/src/corelib/text/qstringconverter.cpp index 90f277ba610..7f68c5113eb 100644 --- a/src/corelib/text/qstringconverter.cpp +++ b/src/corelib/text/qstringconverter.cpp @@ -2374,4 +2374,10 @@ const char *QStringConverter::nameForEncoding(QStringConverter::Encoding e) \sa requiredSpace */ +/*! + \fn char16_t *QStringDecoder::appendToBuffer(char16_t *out, QByteArrayView in) + \since 6.6 + \overload +*/ + QT_END_NAMESPACE diff --git a/src/corelib/text/qstringconverter.h b/src/corelib/text/qstringconverter.h index f10aa3b6d3f..373c1ad1e91 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(appendToBuffer(reinterpret_cast(out), ba)); } Q_CORE_EXPORT static QStringDecoder decoderForHtml(QByteArrayView data); diff --git a/tests/auto/corelib/text/qstringconverter/tst_qstringconverter.cpp b/tests/auto/corelib/text/qstringconverter/tst_qstringconverter.cpp index c93983293c4..253749ede99 100644 --- a/tests/auto/corelib/text/qstringconverter/tst_qstringconverter.cpp +++ b/tests/auto/corelib/text/qstringconverter/tst_qstringconverter.cpp @@ -252,8 +252,8 @@ void tst_QStringConverter::invalidConverter() decoder.resetState(); QVERIFY(!decoder.hasError()); - QChar buffer[100]; - QChar *position = decoder.appendToBuffer(buffer, "Even more"); + char16_t buffer[100]; + char16_t *position = decoder.appendToBuffer(buffer, "Even more"); QCOMPARE(position, buffer); QVERIFY(decoder.hasError()); }