summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2017-07-03 13:08:47 +0200
committerKai Koehne <kai.koehne@qt.io>2017-07-13 15:25:57 +0000
commit627f0a7f7d775ecd263b95dd07fca44bfcb0c5cf (patch)
tree3b5bff23363c939ad079fe90e5f0f6e05be800af /src/corelib
parent70515726181a7e97e1a7096f6b63d4320581d5c1 (diff)
Doc: Improve documentation about append, prepend
The references to the this pointer look somewhat alien in the documentation, because it isn't part of the signature. Rather make the relationship explicit. Change-Id: I6de516e165ea6e9c4ee2898836e9490fbaf4545c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qbytearray.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 38df38a32f..0e7365c32b 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -1516,13 +1516,13 @@ void QByteArray::chop(int n)
\snippet code/src_corelib_tools_qbytearray.cpp 12
Note: QByteArray is an \l{implicitly shared} class. Consequently,
- if \e this is an empty QByteArray, then \e this will just share
- the data held in \a ba. In this case, no copying of data is done,
+ if you append to an empty byte array, then the byte array will just
+ share the data held in \a ba. In this case, no copying of data is done,
taking \l{constant time}. If a shared instance is modified, it will
be copied (copy-on-write), taking \l{linear time}.
- If \e this is not an empty QByteArray, a deep copy of the data is
- performed, taking \l{linear time}.
+ If the byte array being appended to is not empty, a deep copy of the
+ data is performed, taking \l{linear time}.
This operation typically does not suffer from allocation overhead,
because QByteArray preallocates extra space at the end of the data
@@ -1781,13 +1781,13 @@ QByteArray QByteArray::nulTerminated() const
This is the same as insert(0, \a ba).
Note: QByteArray is an \l{implicitly shared} class. Consequently,
- if \e this is an empty QByteArray, then \e this will just share
- the data held in \a ba. In this case, no copying of data is done,
+ if you prepend to an empty byte array, then the byte array will just
+ share the data held in \a ba. In this case, no copying of data is done,
taking \l{constant time}. If a shared instance is modified, it will
be copied (copy-on-write), taking \l{linear time}.
- If \e this is not an empty QByteArray, a deep copy of the data is
- performed, taking \l{linear time}.
+ If the byte array being prepended to is not empty, a deep copy of the
+ data is performed, taking \l{linear time}.
\sa append(), insert()
*/
@@ -1869,13 +1869,13 @@ QByteArray &QByteArray::prepend(char ch)
This is the same as insert(size(), \a ba).
Note: QByteArray is an \l{implicitly shared} class. Consequently,
- if \e this is an empty QByteArray, then \e this will just share
- the data held in \a ba. In this case, no copying of data is done,
+ if you append to an empty byte array, then the byte array will just
+ share the data held in \a ba. In this case, no copying of data is done,
taking \l{constant time}. If a shared instance is modified, it will
be copied (copy-on-write), taking \l{linear time}.
- If \e this is not an empty QByteArray, a deep copy of the data is
- performed, taking \l{linear time}.
+ If the byte array being appended to is not empty, a deep copy of the
+ data is performed, taking \l{linear time}.
This operation typically does not suffer from allocation overhead,
because QByteArray preallocates extra space at the end of the data