From 8712e35aec2c072fe709364eaa69bb8928c5cacc Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 11 May 2023 14:17:17 +0200 Subject: QVarLengthArray/QList: make assign() return a reference to *this MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Qt CI Bot --- src/corelib/tools/qlist.qdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/tools/qlist.qdoc') 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 void QList::assign(qsizetype n, parameter_type t) +/*! \fn template QList::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 template > void QList::assign(InputIterator first, InputIterator last) +/*! \fn template template > QList::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 void QList::assign(std::initializer_list l) +/*! \fn template QList::assign(std::initializer_list l) \since 6.6 Replaces the contents of this list with a copy of the elements of -- cgit v1.2.3