Skip to content

Commit

Permalink
Doc: Remove wrong \obsolete doc comments
Browse files Browse the repository at this point in the history
Change-Id: I541f12fab128493235716fb73d65f4ab0a62bb82
Reviewed-by: Lars Knoll <[email protected]>
  • Loading branch information
kaheimri committed Nov 19, 2020
1 parent 4d19303 commit d41eed0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
11 changes: 7 additions & 4 deletions src/corelib/text/qbytearray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ QByteArray &QByteArray::operator=(const char *str)
/*! \fn QByteArray::operator const char *() const
\fn QByteArray::operator const void *() const
\obsolete Use constData() instead.
\note Use constData() instead in new code.
Returns a pointer to the data stored in the byte array. The
pointer can be used to access the bytes that compose the array.
Expand Down Expand Up @@ -2660,7 +2660,8 @@ bool QByteArray::isLower() const
Returns a byte array that contains the first \a len bytes of this byte
array.
\obsolete Use first() instead in new code.
If you know that \a len cannot be out of bounds, use first() instead in new
code, because it is faster.
The entire byte array is returned if \a len is greater than
size().
Expand All @@ -2682,7 +2683,8 @@ QByteArray QByteArray::left(qsizetype len) const
/*!
Returns a byte array that contains the last \a len bytes of this byte array.
\obsolete Use last() instead in new code.
If you know that \a len cannot be out of bounds, use last() instead in new
code, because it is faster.
The entire byte array is returned if \a len is greater than
size().
Expand All @@ -2704,7 +2706,8 @@ QByteArray QByteArray::right(qsizetype len) const
Returns a byte array containing \a len bytes from this byte array,
starting at position \a pos.
\obsolete Use sliced() instead in new code.
If you know that \a pos and \a len cannot be out of bounds, use sliced()
instead in new code, because it is faster.
If \a len is -1 (the default), or \a pos + \a len >= size(),
returns a byte array containing all bytes starting at position \a
Expand Down
18 changes: 12 additions & 6 deletions src/corelib/text/qstring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4613,7 +4613,8 @@ QString QString::section(const QRegularExpression &re, qsizetype start, qsizetyp
Returns a substring that contains the \a n leftmost characters
of the string.
\obsolete Use first() instead in new code.
If you know that \a n cannot be out of bounds, use first() instead in new
code, because it is faster.
The entire string is returned if \a n is greater than or equal
to size(), or less than zero.
Expand All @@ -4631,7 +4632,8 @@ QString QString::left(qsizetype n) const
Returns a substring that contains the \a n rightmost characters
of the string.
\obsolete Use last() instead in new code.
If you know that \a n cannot be out of bounds, use last() instead in new
code, because it is faster.
The entire string is returned if \a n is greater than or equal
to size(), or less than zero.
Expand All @@ -4649,7 +4651,8 @@ QString QString::right(qsizetype n) const
Returns a string that contains \a n characters of this string,
starting at the specified \a position index.
\obsolete Use sliced() instead in new code.
If you know that \a position and \a n cannot be out of bounds, use sliced()
instead in new code, because it is faster.
Returns a null string if the \a position index exceeds the
length of the string. If there are less than \a n characters
Expand Down Expand Up @@ -9114,7 +9117,8 @@ QString &QString::setRawData(const QChar *unicode, qsizetype size)
Returns the substring of length \a length starting at position
\a start in this Latin-1 string.
\obsolete Use sliced() instead in new code.
If you know that \a start and \a length cannot be out of bounds, use sliced()
instead in new code, because it is faster.
Returns an empty Latin-1 string if \a start exceeds the
length of this Latin-1 string. If there are less than \a length characters
Expand All @@ -9129,7 +9133,8 @@ QString &QString::setRawData(const QChar *unicode, qsizetype size)
\fn QLatin1String QLatin1String::left(qsizetype length) const
\since 5.8
\obsolete Use first() instead in new code.
If you know that \a length cannot be out of bounds, use first() instead in
new code, because it is faster.
Returns the substring of length \a length starting at position
0 in this Latin-1 string.
Expand All @@ -9144,7 +9149,8 @@ QString &QString::setRawData(const QChar *unicode, qsizetype size)
\fn QLatin1String QLatin1String::right(qsizetype length) const
\since 5.8
\obsolete Use last() instead in new code.
If you know that \a length cannot be out of bounds, use last() instead in
new code, because it is faster.
Returns the substring of length \a length starting at position
size() - \a length in this Latin-1 string.
Expand Down

0 comments on commit d41eed0

Please sign in to comment.