summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qbytearray.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2020-06-10 15:00:48 +0200
committerMarc Mutz <marc.mutz@kdab.com>2020-06-11 19:14:03 +0000
commit3f6142f5a1a01f201593f6711930ec77640dea46 (patch)
tree3f6ee88ae701993087454f1193902eb976d1167d /src/corelib/text/qbytearray.cpp
parent7b15417b53ce8c278ab3fcc8c32f8203da4ed697 (diff)
Rename new slice() method sliced()
The recently-added slice() method has the problem that it's a noun as well as a verb in the imperative. Like std::vector::empty, which is both an adjective and a verb in the imperative, this may cause confusion as to what the function does. Using the passive voice form of slice(), sliced(), removes the confusion. While it can be read as an adjective, too, that doesn't change the meaning compared to the verb form. Change-Id: If0aa01acb6cf5dd5eafa8226e3ea7f7a0c9da4f1 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/text/qbytearray.cpp')
-rw-r--r--src/corelib/text/qbytearray.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp
index 3f83e36d90..31ae063cb1 100644
--- a/src/corelib/text/qbytearray.cpp
+++ b/src/corelib/text/qbytearray.cpp
@@ -2949,7 +2949,7 @@ QByteArray QByteArray::left(int len) const
Example:
\snippet code/src_corelib_text_qbytearray.cpp 28
- \sa endsWith(), last(), first(), slice(), chopped(), chop(), truncate()
+ \sa endsWith(), last(), first(), sliced(), chopped(), chop(), truncate()
*/
QByteArray QByteArray::right(int len) const
{
@@ -2964,7 +2964,7 @@ QByteArray QByteArray::right(int len) const
Returns a byte array containing \a len bytes from this byte array,
starting at position \a pos.
- \obsolete Use slice() instead in new code.
+ \obsolete Use sliced() instead in new code.
If \a len is -1 (the default), or \a pos + \a len >= size(),
returns a byte array containing all bytes starting at position \a
@@ -2973,7 +2973,7 @@ QByteArray QByteArray::right(int len) const
Example:
\snippet code/src_corelib_text_qbytearray.cpp 29
- \sa first(), last(), slice(), chopped(), chop(), truncate()
+ \sa first(), last(), sliced(), chopped(), chop(), truncate()
*/
QByteArray QByteArray::mid(int pos, int len) const
@@ -3007,7 +3007,7 @@ QByteArray QByteArray::mid(int pos, int len) const
\note The behavior is undefined when \a n < 0 or \a n > size().
- \sa last(), slice(), from(), startsWith(), chopped(), chop(), truncate()
+ \sa last(), sliced(), from(), startsWith(), chopped(), chop(), truncate()
*/
/*!
@@ -3018,11 +3018,11 @@ QByteArray QByteArray::mid(int pos, int len) const
\note The behavior is undefined when \a n < 0 or \a n > size().
- \sa first(), slice(), from(), endsWith(), chopped(), chop(), truncate()
+ \sa first(), sliced(), from(), endsWith(), chopped(), chop(), truncate()
*/
/*!
- \fn QByteArray QByteArray::slice(qsizetype pos, qsizetype n) const
+ \fn QByteArray QByteArray::sliced(qsizetype pos, qsizetype n) const
\since 6.0
Returns a byte array containing the \a n bytes of this object starting
@@ -3043,7 +3043,7 @@ QByteArray QByteArray::mid(int pos, int len) const
\note The behavior is undefined when \a pos < 0 or \a pos > size().
- \sa first(), last(), slice(), chopped(), chop(), truncate()
+ \sa first(), last(), sliced(), chopped(), chop(), truncate()
*/
/*!