summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytearray.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-01-31 10:36:04 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-01 21:34:00 +0100
commite5fd2417701c1ecf35a3c771c647d931cef3f375 (patch)
treeb76301f656720077b7b21f0c54bc81eac7a82298 /src/corelib/tools/qbytearray.cpp
parent404a84e4115bb71aafd6a8944481aeb0fe17cc59 (diff)
Fix QByteArray documentation w.r.t. QString-related methods
There's no loss of data when converting a Unicode string to UTF-8, so don't state that in the docs. Change-Id: If26914ec674a994d9c59136448e8e4292d0412e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qbytearray.cpp')
-rw-r--r--src/corelib/tools/qbytearray.cpp30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 03b10903ab..3e3bae9a94 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -1303,12 +1303,10 @@ void QByteArray::chop(int n)
returns a reference to this byte array. The Unicode data is
converted into 8-bit characters using QString::toUtf8().
- If the QString contains non-ASCII Unicode characters, using this
- operator can lead to loss of information. You can disable this
- operator by defining \c QT_NO_CAST_TO_ASCII when you compile your
- applications. You then need to call QString::toUtf8() (or
- QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
- explicitly if you want to convert the data to \c{const char *}.
+ You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
+ compile your applications. You then need to call QString::toUtf8() (or
+ QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to
+ convert the data to \c{const char *}.
*/
/*! \fn QByteArray &QByteArray::operator+=(const char *str)
@@ -1667,12 +1665,10 @@ QByteArray &QByteArray::append(const QByteArray &ba)
Appends the string \a str to this byte array. The Unicode data is
converted into 8-bit characters using QString::toUtf8().
- If the QString contains non-ASCII Unicode characters, using this
- function can lead to loss of information. You can disable this
- function by defining \c QT_NO_CAST_TO_ASCII when you compile your
- applications. You then need to call QString::toUtf8() (or
- QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
- explicitly if you want to convert the data to \c{const char *}.
+ You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
+ compile your applications. You then need to call QString::toUtf8() (or
+ QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to
+ convert the data to \c{const char *}.
*/
/*!
@@ -2148,12 +2144,10 @@ QByteArray &QByteArray::replace(char before, const QByteArray &after)
string \a after. The Unicode data is converted into 8-bit
characters using QString::toUtf8().
- If the QString contains non-ASCII Unicode characters, using this
- function can lead to loss of information. You can disable this
- function by defining \c QT_NO_CAST_TO_ASCII when you compile your
- applications. You then need to call QString::toUtf8() (or
- QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
- explicitly if you want to convert the data to \c{const char *}.
+ You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
+ compile your applications. You then need to call QString::toUtf8() (or
+ QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to
+ convert the data to \c{const char *}.
*/
/*! \fn QByteArray &QByteArray::replace(char before, const char *after)