Add a QStringBuilder::toUtf8() function
Just to match the ones that are already there. Change-Id: I25acc2391feded4cac79ebf65a6bc72176f5f931 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
parent
6e6b74c0c7
commit
1ea3c22e66
@ -100,6 +100,10 @@ QT_BEGIN_NAMESPACE
|
|||||||
returned byte array is undefined if the string contains non-Latin1
|
returned byte array is undefined if the string contains non-Latin1
|
||||||
characters.
|
characters.
|
||||||
*/
|
*/
|
||||||
|
/* \fn QByteArray QStringBuilder::toUtf8() const
|
||||||
|
Returns a UTF-8 representation of the string as a QByteArray.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*! \internal
|
/*! \internal
|
||||||
*/
|
*/
|
||||||
|
@ -97,6 +97,7 @@ template<typename Builder>
|
|||||||
struct QStringBuilderBase<Builder, QString> : public QStringBuilderCommon<Builder, QString>
|
struct QStringBuilderBase<Builder, QString> : public QStringBuilderCommon<Builder, QString>
|
||||||
{
|
{
|
||||||
QByteArray toLatin1() const { return this->resolved().toLatin1(); }
|
QByteArray toLatin1() const { return this->resolved().toLatin1(); }
|
||||||
|
QByteArray toUtf8() const { return this->resolved().toUtf8(); }
|
||||||
QByteArray toLocal8Bit() const { return this->resolved().toLocal8Bit(); }
|
QByteArray toLocal8Bit() const { return this->resolved().toLocal8Bit(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user