From: Thiago Macieira Date: Wed, 25 Apr 2012 16:01:24 +0000 (+0200) Subject: Add a QStringBuilder::toUtf8() function X-Git-Tag: 071012110112~1042 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ea3c22e66d0b808e41f3a4d5dab534b68e037b4;p=profile%2Fivi%2Fqtbase.git Add a QStringBuilder::toUtf8() function Just to match the ones that are already there. Change-Id: I25acc2391feded4cac79ebf65a6bc72176f5f931 Reviewed-by: hjk --- diff --git a/src/corelib/tools/qstringbuilder.cpp b/src/corelib/tools/qstringbuilder.cpp index 2fe5560..2aeb891 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 6b258eb..461430a 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(); } };