diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-06-19 11:01:33 +0200 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2014-06-25 16:51:53 +0200 |
commit | a1fc11ca655850a47701f3715f1408c336ddb6c7 (patch) | |
tree | 39f897d1674a11368ef98a840edea178be48ee4e /src/corelib/tools/qstring.cpp | |
parent | 273ed8e0fa527f4c4382d45eaced54314318173f (diff) |
Introduce std::string conversion to QByteArray
Add conversion methods similar to those in QString to QByteArray. This
is often more useful than the QString version since std::string like
QByteArray are byte arrays.
[ChangeLog][QtCore][QByteArray] Added convenience methods to convert
directly to and from std::string.
Change-Id: I92c29d4bb1d9e06a667dd9cdd936970e2d272006
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools/qstring.cpp')
-rw-r--r-- | src/corelib/tools/qstring.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index a7d516a726..a7f932698b 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -1330,7 +1330,7 @@ const QString::Null QString::null = { }; This constructor is only available if Qt is configured with STL compatibility enabled. - \sa fromLatin1(), fromLocal8Bit(), fromUtf8() + \sa fromLatin1(), fromLocal8Bit(), fromUtf8(), QByteArray::fromStdString() */ /*! \fn QString QString::fromStdWString(const std::wstring &str) @@ -7748,7 +7748,7 @@ bool QString::isRightToLeft() const If the QString contains non-Latin1 Unicode characters, using this can lead to loss of information. - \sa toLatin1(), toUtf8(), toLocal8Bit() + \sa toLatin1(), toUtf8(), toLocal8Bit(), QByteArray::toStdString() */ /*! |