summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlist.qdoc
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-05-11 14:17:17 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-05-17 06:44:45 +0200
commit8712e35aec2c072fe709364eaa69bb8928c5cacc (patch)
tree6c0a54722d4f784ae279bb07f28fae225684384d /src/corelib/tools/qlist.qdoc
parent782ccc6de5950ff1f6d3eeaaeacc7af4bc97a84f (diff)
QVarLengthArray/QList: make assign() return a reference to *this
While std::vector::assign() returns void, std::basic_string::assign() returns std::basic_string&. In Qt, we want to be consistent between {QVLA,QList,QString,QByteArray}::assign(), and returning *this is the more general solution, so do that. Task-number: QTBUG-106196 Task-number: QTBUG-106200 Change-Id: I2689b4af032ab6fb3f8fbcb4d825d5201ea5abeb Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/corelib/tools/qlist.qdoc')
-rw-r--r--src/corelib/tools/qlist.qdoc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qlist.qdoc b/src/corelib/tools/qlist.qdoc
index a23e7d73fb..554d07ec1b 100644
--- a/src/corelib/tools/qlist.qdoc
+++ b/src/corelib/tools/qlist.qdoc
@@ -1538,7 +1538,7 @@
\sa erase
*/
-/*! \fn template <typename T> void QList<T>::assign(qsizetype n, parameter_type t)
+/*! \fn template <typename T> QList<T>::assign(qsizetype n, parameter_type t)
\since 6.6
Replaces the contents of this list with \a n copies of \a t.
@@ -1549,7 +1549,7 @@
list or this list is shared.
*/
-/*! \fn template <typename T> template <typename InputIterator, if_input_iterator<InputIterator>> void QList<T>::assign(InputIterator first, InputIterator last)
+/*! \fn template <typename T> template <typename InputIterator, if_input_iterator<InputIterator>> QList<T>::assign(InputIterator first, InputIterator last)
\since 6.6
Replaces the contents of this list with a copy of the elements in the
@@ -1569,7 +1569,7 @@
*this.
*/
-/*! \fn template <typename T> void QList<T>::assign(std::initializer_list<T> l)
+/*! \fn template <typename T> QList<T>::assign(std::initializer_list<T> l)
\since 6.6
Replaces the contents of this list with a copy of the elements of