diff --git a/src/corelib/tools/qstringbuilder.cpp b/src/corelib/tools/qstringbuilder.cpp index 2fe556096b..2aeb891d23 100644 --- a/src/corelib/tools/qstringbuilder.cpp +++ b/src/corelib/tools/qstringbuilder.cpp @@ -100,6 +100,10 @@ QT_BEGIN_NAMESPACE returned byte array is undefined if the string contains non-Latin1 characters. */ +/* \fn QByteArray QStringBuilder::toUtf8() const + Returns a UTF-8 representation of the string as a QByteArray. + */ + /*! \internal */ diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h index 6b258eb09a..461430ab9a 100644 --- a/src/corelib/tools/qstringbuilder.h +++ b/src/corelib/tools/qstringbuilder.h @@ -97,6 +97,7 @@ template struct QStringBuilderBase : public QStringBuilderCommon { QByteArray toLatin1() const { return this->resolved().toLatin1(); } + QByteArray toUtf8() const { return this->resolved().toUtf8(); } QByteArray toLocal8Bit() const { return this->resolved().toLocal8Bit(); } };