summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlist.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2017-09-13 12:07:28 +0200
committerMartin Smith <martin.smith@qt.io>2017-12-01 10:48:22 +0000
commitb23c52ea8110f05def21713934fcc6131f44ec6a (patch)
treeab6de0140a78f2bbbe559a0a1708cda45a0f784b /src/corelib/tools/qlist.cpp
parent32326a4b3b8234f56bb1c5f47b5bdd6c8fec7917 (diff)
Add template text to \fn commands in container classes
The \fn commands were not recognized by clang-qdoc because the template stuff was missing from the \fn commands. This update adds the correct template text and parameters. It eliminates nearly 2000 qdoc warnings. Change-Id: Ibe047424396a8f99f8bd64efea1b0d8cc7c7527d Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/corelib/tools/qlist.cpp')
-rw-r--r--src/corelib/tools/qlist.cpp294
1 files changed, 147 insertions, 147 deletions
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index 5f26e704c4..c01d0c2d61 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -515,7 +515,7 @@ void **QListData::erase(void **xi)
*/
/*!
- \fn QList::QList(QList<T> &&other)
+ \fn template <class T> QList<T>::QList(QList<T> &&other)
Move-constructs a QList instance, making it point at the same
object that \a other was pointing to.
@@ -524,7 +524,7 @@ void **QListData::erase(void **xi)
*/
/*!
- \fn QList<T> QList<T>::mid(int pos, int length) const
+ \fn template <class T> QList<T> QList<T>::mid(int pos, int length) const
Returns a sub-list which includes elements from this list,
starting at position \a pos. If \a length is -1 (the default), all
@@ -533,12 +533,12 @@ void **QListData::erase(void **xi)
are included.
*/
-/*! \fn QList::QList()
+/*! \fn template <class T> QList<T>::QList()
Constructs an empty list.
*/
-/*! \fn QList::QList(const QList<T> &other)
+/*! \fn template <class T> QList<T>::QList(const QList<T> &other)
Constructs a copy of \a other.
@@ -551,7 +551,7 @@ void **QListData::erase(void **xi)
\sa operator=()
*/
-/*! \fn inline QList::QList(std::initializer_list<T> args)
+/*! \fn template <class T> QList<T>::QList(std::initializer_list<T> args)
\since 4.8
Construct a list from the std::initializer_list specified by \a args.
@@ -560,34 +560,34 @@ void **QListData::erase(void **xi)
lists.
*/
-/*! \fn QList::~QList()
+/*! \fn template <class T> QList<T>::~QList()
Destroys the list. References to the values in the list and all
iterators of this list become invalid.
*/
-/*! \fn QList<T> &QList::operator=(const QList<T> &other)
+/*! \fn template <class T> QList<T> &QList<T>::operator=(const QList<T> &other)
Assigns \a other to this list and returns a reference to this
list.
*/
/*!
- \fn QList &QList::operator=(QList<T> &&other)
+ \fn template <class T> QList &QList<T>::operator=(QList<T> &&other)
Move-assigns \a other to this QList instance.
\since 5.2
*/
-/*! \fn void QList::swap(QList<T> &other)
+/*! \fn template <class T> void QList<T>::swap(QList<T> &other)
\since 4.8
Swaps list \a other with this list. This operation is very
fast and never fails.
*/
-/*! \fn bool QList::operator==(const QList<T> &other) const
+/*! \fn template <class T> bool QList<T>::operator==(const QList<T> &other) const
Returns \c true if \a other is equal to this list; otherwise returns
false.
@@ -601,7 +601,7 @@ void **QListData::erase(void **xi)
\sa operator!=()
*/
-/*! \fn bool QList::operator!=(const QList<T> &other) const
+/*! \fn template <class T> bool QList<T>::operator!=(const QList<T> &other) const
Returns \c true if \a other is not equal to this list; otherwise
returns \c false.
@@ -615,7 +615,7 @@ void **QListData::erase(void **xi)
\sa operator==()
*/
-/*! \fn bool operator<(const QList<T> &lhs, const QList<T> &rhs)
+/*! \fn template <class T> bool operator<(const QList<T> &lhs, const QList<T> &rhs)
\since 5.6
\relates QList
@@ -627,7 +627,7 @@ void **QListData::erase(void **xi)
of \c operator<().
*/
-/*! \fn bool operator<=(const QList<T> &lhs, const QList<T> &rhs)
+/*! \fn template <class T> bool operator<=(const QList<T> &lhs, const QList<T> &rhs)
\since 5.6
\relates QList
@@ -639,7 +639,7 @@ void **QListData::erase(void **xi)
of \c operator<().
*/
-/*! \fn bool operator>(const QList<T> &lhs, const QList<T> &rhs)
+/*! \fn template <class T> bool operator>(const QList<T> &lhs, const QList<T> &rhs)
\since 5.6
\relates QList
@@ -651,7 +651,7 @@ void **QListData::erase(void **xi)
of \c operator<().
*/
-/*! \fn bool operator>=(const QList<T> &lhs, const QList<T> &rhs)
+/*! \fn template <class T> bool operator>=(const QList<T> &lhs, const QList<T> &rhs)
\since 5.6
\relates QList
@@ -664,7 +664,7 @@ void **QListData::erase(void **xi)
*/
/*!
- \fn uint qHash(const QList<T> &key, uint seed = 0)
+ \fn template <class T> uint qHash(const QList<T> &key, uint seed = 0)
\since 5.6
\relates QList
@@ -675,19 +675,19 @@ void **QListData::erase(void **xi)
*/
/*!
- \fn int QList::size() const
+ \fn template <class T> int QList<T>::size() const
Returns the number of items in the list.
\sa isEmpty(), count()
*/
-/*! \fn void QList::detach()
+/*! \fn template <class T> void QList<T>::detach()
\internal
*/
-/*! \fn void QList::detachShared()
+/*! \fn template <class T> void QList<T>::detachShared()
\internal
@@ -696,22 +696,22 @@ void **QListData::erase(void **xi)
in case of cleanup work done in destructors on empty lists.
*/
-/*! \fn bool QList::isDetached() const
+/*! \fn template <class T> bool QList<T>::isDetached() const
\internal
*/
-/*! \fn void QList::setSharable(bool sharable)
+/*! \fn template <class T> void QList<T>::setSharable(bool sharable)
\internal
*/
-/*! \fn bool QList::isSharedWith(const QList<T> &other) const
+/*! \fn template <class T> bool QList<T>::isSharedWith(const QList<T> &other) const
\internal
*/
-/*! \fn bool QList::isEmpty() const
+/*! \fn template <class T> bool QList<T>::isEmpty() const
Returns \c true if the list contains no items; otherwise returns
false.
@@ -719,14 +719,14 @@ void **QListData::erase(void **xi)
\sa size()
*/
-/*! \fn void QList::clear()
+/*! \fn template <class T> void QList<T>::clear()
Removes all items from the list.
\sa removeAll()
*/
-/*! \fn const T &QList::at(int i) const
+/*! \fn template <class T> const T &QList<T>::at(int i) const
Returns the item at index position \a i in the list. \a i must be
a valid index position in the list (i.e., 0 <= \a i < size()).
@@ -736,7 +736,7 @@ void **QListData::erase(void **xi)
\sa value(), operator[]()
*/
-/*! \fn T &QList::operator[](int i)
+/*! \fn template <class T> T &QList<T>::operator[](int i)
Returns the item at index position \a i as a modifiable reference.
\a i must be a valid index position in the list (i.e., 0 <= \a i <
@@ -750,14 +750,14 @@ void **QListData::erase(void **xi)
\sa at(), value()
*/
-/*! \fn const T &QList::operator[](int i) const
+/*! \fn template <class T> const T &QList<T>::operator[](int i) const
\overload
Same as at(). This function runs in \l{Algorithmic Complexity}{constant time}.
*/
-/*! \fn QList::reserve(int alloc)
+/*! \fn template <class T> QList<T>::reserve(int alloc)
Reserve space for \a alloc elements.
@@ -770,7 +770,7 @@ void **QListData::erase(void **xi)
\since 4.7
*/
-/*! \fn void QList::append(const T &value)
+/*! \fn template <class T> void QList<T>::append(const T &value)
Inserts \a value at the end of the list.
@@ -787,7 +787,7 @@ void **QListData::erase(void **xi)
\sa operator<<(), prepend(), insert()
*/
-/*! \fn void QList::append(const QList<T> &value)
+/*! \fn template <class T> void QList<T>::append(const QList<T> &value)
\overload
@@ -798,7 +798,7 @@ void **QListData::erase(void **xi)
\sa operator<<(), operator+=()
*/
-/*! \fn void QList::prepend(const T &value)
+/*! \fn template <class T> void QList<T>::prepend(const T &value)
Inserts \a value at the beginning of the list.
@@ -815,7 +815,7 @@ void **QListData::erase(void **xi)
\sa append(), insert()
*/
-/*! \fn void QList::insert(int i, const T &value)
+/*! \fn template <class T> void QList<T>::insert(int i, const T &value)
Inserts \a value at index position \a i in the list. If \a i <= 0,
the value is prepended to the list. If \a i >= size(), the
@@ -827,7 +827,7 @@ void **QListData::erase(void **xi)
\sa append(), prepend(), replace(), removeAt()
*/
-/*! \fn QList::iterator QList::insert(iterator before, const T &value)
+/*! \fn template <class T> QList<T>::iterator QList<T>::insert(iterator before, const T &value)
\overload
@@ -838,7 +838,7 @@ void **QListData::erase(void **xi)
instead.
*/
-/*! \fn void QList::replace(int i, const T &value)
+/*! \fn template <class T> void QList<T>::replace(int i, const T &value)
Replaces the item at index position \a i with \a value. \a i must
be a valid index position in the list (i.e., 0 <= \a i < size()).
@@ -847,7 +847,7 @@ void **QListData::erase(void **xi)
*/
/*!
- \fn int QList::removeAll(const T &value)
+ \fn template <class T> int QList<T>::removeAll(const T &value)
Removes all occurrences of \a value in the list and returns the
number of entries removed.
@@ -862,7 +862,7 @@ void **QListData::erase(void **xi)
*/
/*!
- \fn bool QList::removeOne(const T &value)
+ \fn template <class T> bool QList<T>::removeOne(const T &value)
\since 4.4
Removes the first occurrence of \a value in the list and returns
@@ -877,7 +877,7 @@ void **QListData::erase(void **xi)
\sa removeAll(), removeAt(), takeAt(), replace()
*/
-/*! \fn void QList::removeAt(int i)
+/*! \fn template <class T> void QList<T>::removeAt(int i)
Removes the item at index position \a i. \a i must be a valid
index position in the list (i.e., 0 <= \a i < size()).
@@ -885,7 +885,7 @@ void **QListData::erase(void **xi)
\sa takeAt(), removeFirst(), removeLast(), removeOne()
*/
-/*! \fn T QList::takeAt(int i)
+/*! \fn template <class T> T QList<T>::takeAt(int i)
Removes the item at index position \a i and returns it. \a i must
be a valid index position in the list (i.e., 0 <= \a i < size()).
@@ -895,7 +895,7 @@ void **QListData::erase(void **xi)
\sa removeAt(), takeFirst(), takeLast()
*/
-/*! \fn T QList::takeFirst()
+/*! \fn template <class T> T QList<T>::takeFirst()
Removes the first item in the list and returns it. This is the
same as takeAt(0). This function assumes the list is not empty. To
@@ -910,7 +910,7 @@ void **QListData::erase(void **xi)
\sa takeLast(), takeAt(), removeFirst()
*/
-/*! \fn T QList::takeLast()
+/*! \fn template <class T> T QList<T>::takeLast()
Removes the last item in the list and returns it. This is the
same as takeAt(size() - 1). This function assumes the list is
@@ -926,7 +926,7 @@ void **QListData::erase(void **xi)
\sa takeFirst(), takeAt(), removeLast()
*/
-/*! \fn void QList::move(int from, int to)
+/*! \fn template <class T> void QList<T>::move(int from, int to)
Moves the item at index position \a from to index position \a to.
@@ -941,7 +941,7 @@ void **QListData::erase(void **xi)
\sa swap(), insert(), takeAt()
*/
-/*! \fn void QList::swap(int i, int j)
+/*! \fn template <class T> void QList<T>::swap(int i, int j)
Exchange the item at index position \a i with the item at index
position \a j. This function assumes that both \a i and \a j are
@@ -954,7 +954,7 @@ void **QListData::erase(void **xi)
\sa move()
*/
-/*! \fn int QList::indexOf(const T &value, int from = 0) const
+/*! \fn template <class T> int QList<T>::indexOf(const T &value, int from = 0) const
Returns the index position of the first occurrence of \a value in
the list, searching forward from index position \a from. Returns
@@ -973,7 +973,7 @@ void **QListData::erase(void **xi)
\sa lastIndexOf(), contains()
*/
-/*! \fn int QList::lastIndexOf(const T &value, int from = -1) const
+/*! \fn template <class T> int QList<T>::lastIndexOf(const T &value, int from = -1) const
Returns the index position of the last occurrence of \a value in
the list, searching backward from index position \a from. If \a
@@ -993,7 +993,7 @@ void **QListData::erase(void **xi)
\sa indexOf()
*/
-/*! \fn bool QList::contains(const T &value) const
+/*! \fn template <class T> bool QList<T>::contains(const T &value) const
Returns \c true if the list contains an occurrence of \a value;
otherwise returns \c false.
@@ -1004,7 +1004,7 @@ void **QListData::erase(void **xi)
\sa indexOf(), count()
*/
-/*! \fn int QList::count(const T &value) const
+/*! \fn template <class T> int QList<T>::count(const T &value) const
Returns the number of occurrences of \a value in the list.
@@ -1014,7 +1014,7 @@ void **QListData::erase(void **xi)
\sa contains(), indexOf()
*/
-/*! \fn bool QList::startsWith(const T &value) const
+/*! \fn template <class T> bool QList<T>::startsWith(const T &value) const
\since 4.5
Returns \c true if this list is not empty and its first
@@ -1023,7 +1023,7 @@ void **QListData::erase(void **xi)
\sa isEmpty(), contains()
*/
-/*! \fn bool QList::endsWith(const T &value) const
+/*! \fn template <class T> bool QList<T>::endsWith(const T &value) const
\since 4.5
Returns \c true if this list is not empty and its last
@@ -1032,7 +1032,7 @@ void **QListData::erase(void **xi)
\sa isEmpty(), contains()
*/
-/*! \fn QList::iterator QList::begin()
+/*! \fn template <class T> QList<T>::iterator QList<T>::begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in
the list.
@@ -1040,12 +1040,12 @@ void **QListData::erase(void **xi)
\sa constBegin(), end()
*/
-/*! \fn QList::const_iterator QList::begin() const
+/*! \fn template <class T> QList<T>::const_iterator QList<T>::begin() const
\overload
*/
-/*! \fn QList::const_iterator QList::cbegin() const
+/*! \fn template <class T> QList<T>::const_iterator QList<T>::cbegin() const
\since 5.0
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
@@ -1054,7 +1054,7 @@ void **QListData::erase(void **xi)
\sa begin(), cend()
*/
-/*! \fn QList::const_iterator QList::constBegin() const
+/*! \fn template <class T> QList<T>::const_iterator QList<T>::constBegin() const
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the list.
@@ -1062,7 +1062,7 @@ void **QListData::erase(void **xi)
\sa begin(), constEnd()
*/
-/*! \fn QList::iterator QList::end()
+/*! \fn template <class T> QList<T>::iterator QList<T>::end()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item
after the last item in the list.
@@ -1070,12 +1070,12 @@ void **QListData::erase(void **xi)
\sa begin(), constEnd()
*/
-/*! \fn const_iterator QList::end() const
+/*! \fn template <class T> const_iterator QList<T>::end() const
\overload
*/
-/*! \fn QList::const_iterator QList::cend() const
+/*! \fn template <class T> QList<T>::const_iterator QList<T>::cend() const
\since 5.0
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
@@ -1084,7 +1084,7 @@ void **QListData::erase(void **xi)
\sa cbegin(), end()
*/
-/*! \fn QList::const_iterator QList::constEnd() const
+/*! \fn template <class T> QList<T>::const_iterator QList<T>::constEnd() const
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the list.
@@ -1092,7 +1092,7 @@ void **QListData::erase(void **xi)
\sa constBegin(), end()
*/
-/*! \fn QList::reverse_iterator QList::rbegin()
+/*! \fn template <class T> QList<T>::reverse_iterator QList<T>::rbegin()
\since 5.6
Returns a \l{STL-style iterators}{STL-style} reverse iterator pointing to the first
@@ -1101,12 +1101,12 @@ void **QListData::erase(void **xi)
\sa begin(), crbegin(), rend()
*/
-/*! \fn QList::const_reverse_iterator QList::rbegin() const
+/*! \fn template <class T> QList<T>::const_reverse_iterator QList<T>::rbegin() const
\since 5.6
\overload
*/
-/*! \fn QList::const_reverse_iterator QList::crbegin() const
+/*! \fn template <class T> QList<T>::const_reverse_iterator QList<T>::crbegin() const
\since 5.6
Returns a const \l{STL-style iterators}{STL-style} reverse iterator pointing to the first
@@ -1115,7 +1115,7 @@ void **QListData::erase(void **xi)
\sa begin(), rbegin(), rend()
*/
-/*! \fn QList::reverse_iterator QList::rend()
+/*! \fn template <class T> QList<T>::reverse_iterator QList<T>::rend()
\since 5.6
Returns a \l{STL-style iterators}{STL-style} reverse iterator pointing to one past
@@ -1124,12 +1124,12 @@ void **QListData::erase(void **xi)
\sa end(), crend(), rbegin()
*/
-/*! \fn QList::const_reverse_iterator QList::rend() const
+/*! \fn template <class T> QList<T>::const_reverse_iterator QList<T>::rend() const
\since 5.6
\overload
*/
-/*! \fn QList::const_reverse_iterator QList::crend() const
+/*! \fn template <class T> QList<T>::const_reverse_iterator QList<T>::crend() const
\since 5.6
Returns a const \l{STL-style iterators}{STL-style} reverse iterator pointing to one
@@ -1138,7 +1138,7 @@ void **QListData::erase(void **xi)
\sa end(), rend(), rbegin()
*/
-/*! \fn QList::iterator QList::erase(iterator pos)
+/*! \fn template <class T> QList<T>::iterator QList<T>::erase(iterator pos)
Removes the item associated with the iterator \a pos from the
list, and returns an iterator to the next item in the list (which
@@ -1147,7 +1147,7 @@ void **QListData::erase(void **xi)
\sa insert(), removeAt()
*/
-/*! \fn QList::iterator QList::erase(iterator begin, iterator end)
+/*! \fn template <class T> QList<T>::iterator QList<T>::erase(iterator begin, iterator end)
\overload
@@ -1240,13 +1240,13 @@ void **QListData::erase(void **xi)
\sa QList::rbegin(), QList::rend(), QList::reverse_iterator, QList::const_iterator
*/
-/*! \fn int QList::count() const
+/*! \fn template <class T> int QList<T>::count() const
Returns the number of items in the list. This is effectively the
same as size().
*/
-/*! \fn int QList::length() const
+/*! \fn template <class T> int QList<T>::length() const
\since 4.5
This function is identical to count().
@@ -1254,7 +1254,7 @@ void **QListData::erase(void **xi)
\sa count()
*/
-/*! \fn T& QList::first()
+/*! \fn template <class T> T& QList<T>::first()
Returns a reference to the first item in the list. The list must
not be empty. If the list can be empty, call isEmpty() before
@@ -1263,12 +1263,12 @@ void **QListData::erase(void **xi)
\sa constFirst(), last(), isEmpty()
*/
-/*! \fn const T& QList::first() const
+/*! \fn template <class T> const T& QList<T>::first() const
\overload
*/
-/*! \fn const T& QList::constFirst() const
+/*! \fn template <class T> const T& QList<T>::constFirst() const
\since 5.6
Returns a const reference to the first item in the list. The list must
@@ -1278,7 +1278,7 @@ void **QListData::erase(void **xi)
\sa constLast(), isEmpty(), first()
*/
-/*! \fn T& QList::last()
+/*! \fn template <class T> T& QList<T>::last()
Returns a reference to the last item in the list. The list must
not be empty. If the list can be empty, call isEmpty() before
@@ -1287,12 +1287,12 @@ void **QListData::erase(void **xi)
\sa constLast(), first(), isEmpty()
*/
-/*! \fn const T& QList::last() const
+/*! \fn template <class T> const T& QList<T>::last() const
\overload
*/
-/*! \fn const T& QList::constLast() const
+/*! \fn template <class T> const T& QList<T>::constLast() const
\since 5.6
Returns a reference to the last item in the list. The list must
@@ -1302,7 +1302,7 @@ void **QListData::erase(void **xi)
\sa constFirst(), isEmpty(), last()
*/
-/*! \fn void QList::removeFirst()
+/*! \fn template <class T> void QList<T>::removeFirst()
Removes the first item in the list. Calling this function is
equivalent to calling removeAt(0). The list must not be empty. If
@@ -1312,7 +1312,7 @@ void **QListData::erase(void **xi)
\sa removeAt(), takeFirst()
*/
-/*! \fn void QList::removeLast()
+/*! \fn template <class T> void QList<T>::removeLast()
Removes the last item in the list. Calling this function is
equivalent to calling removeAt(size() - 1). The list must not be
@@ -1322,7 +1322,7 @@ void **QListData::erase(void **xi)
\sa removeAt(), takeLast()
*/
-/*! \fn T QList::value(int i) const
+/*! \fn template <class T> T QList<T>::value(int i) const
Returns the value at index position \a i in the list.
@@ -1334,7 +1334,7 @@ void **QListData::erase(void **xi)
\sa at(), operator[]()
*/
-/*! \fn T QList::value(int i, const T &defaultValue) const
+/*! \fn template <class T> T QList<T>::value(int i, const T &defaultValue) const
\overload
@@ -1342,63 +1342,63 @@ void **QListData::erase(void **xi)
\a defaultValue.
*/
-/*! \fn void QList::push_back(const T &value)
+/*! \fn template <class T> void QList<T>::push_back(const T &value)
This function is provided for STL compatibility. It is equivalent
to \l{QList::append()}{append(\a value)}.
*/
-/*! \fn void QList::push_front(const T &value)
+/*! \fn template <class T> void QList<T>::push_front(const T &value)
This function is provided for STL compatibility. It is equivalent
to \l{QList::prepend()}{prepend(\a value)}.
*/
-/*! \fn T& QList::front()
+/*! \fn template <class T> T& QList<T>::front()
This function is provided for STL compatibility. It is equivalent
to first(). The list must not be empty. If the list can be empty,
call isEmpty() before calling this function.
*/
-/*! \fn const T& QList::front() const
+/*! \fn template <class T> const T& QList<T>::front() const
\overload
*/
-/*! \fn T& QList::back()
+/*! \fn template <class T> T& QList<T>::back()
This function is provided for STL compatibility. It is equivalent
to last(). The list must not be empty. If the list can be empty,
call isEmpty() before calling this function.
*/
-/*! \fn const T& QList::back() const
+/*! \fn template <class T> const T& QList<T>::back() const
\overload
*/
-/*! \fn void QList::pop_front()
+/*! \fn template <class T> void QList<T>::pop_front()
This function is provided for STL compatibility. It is equivalent
to removeFirst(). The list must not be empty. If the list can be
empty, call isEmpty() before calling this function.
*/
-/*! \fn void QList::pop_back()
+/*! \fn template <class T> void QList<T>::pop_back()
This function is provided for STL compatibility. It is equivalent
to removeLast(). The list must not be empty. If the list can be
empty, call isEmpty() before calling this function.
*/
-/*! \fn bool QList::empty() const
+/*! \fn template <class T> bool QList<T>::empty() const
This function is provided for STL compatibility. It is equivalent
to isEmpty() and returns \c true if the list is empty.
*/
-/*! \fn QList<T> &QList::operator+=(const QList<T> &other)
+/*! \fn template <class T> QList<T> &QList<T>::operator+=(const QList<T> &other)
Appends the items of the \a other list to this list and returns a
reference to this list.
@@ -1406,7 +1406,7 @@ void **QListData::erase(void **xi)
\sa operator+(), append()
*/
-/*! \fn void QList::operator+=(const T &value)
+/*! \fn template <class T> void QList<T>::operator+=(const T &value)
\overload
@@ -1415,7 +1415,7 @@ void **QListData::erase(void **xi)
\sa append(), operator<<()
*/
-/*! \fn QList<T> QList::operator+(const QList<T> &other) const
+/*! \fn template <class T> QList<T> QList<T>::operator+(const QList<T> &other) const
Returns a list that contains all the items in this list followed
by all the items in the \a other list.
@@ -1423,7 +1423,7 @@ void **QListData::erase(void **xi)
\sa operator+=()
*/
-/*! \fn QList<T> &QList::operator<<(const QList<T> &other)
+/*! \fn template <class T> QList<T> &QList<T>::operator<<(const QList<T> &other)
Appends the items of the \a other list to this list and returns a
reference to this list.
@@ -1431,7 +1431,7 @@ void **QListData::erase(void **xi)
\sa operator+=(), append()
*/
-/*! \fn void QList::operator<<(const T &value)
+/*! \fn template <class T> void QList<T>::operator<<(const T &value)
\overload
@@ -1521,7 +1521,7 @@ void **QListData::erase(void **xi)
\internal
*/
-/*! \fn QList::iterator::iterator()
+/*! \fn template <class T> QList<T>::iterator::iterator()
Constructs an uninitialized iterator.
@@ -1532,17 +1532,17 @@ void **QListData::erase(void **xi)
\sa QList::begin(), QList::end()
*/
-/*! \fn QList::iterator::iterator(Node *node)
+/*! \fn template <class T> QList<T>::iterator::iterator(Node *node)
\internal
*/
-/*! \fn QList::iterator::iterator(const iterator &other)
+/*! \fn template <class T> QList<T>::iterator::iterator(const iterator &other)
Constructs a copy of \a other.
*/
-/*! \fn T &QList::iterator::operator*() const
+/*! \fn template <class T> T &QList<T>::iterator::operator*() const
Returns a modifiable reference to the current item.
@@ -1554,14 +1554,14 @@ void **QListData::erase(void **xi)
\sa operator->()
*/
-/*! \fn T *QList::iterator::operator->() const
+/*! \fn template <class T> T *QList<T>::iterator::operator->() const
Returns a pointer to the current item.
\sa operator*()
*/
-/*! \fn T &QList::iterator::operator[](difference_type j) const
+/*! \fn template <class T> T &QList<T>::iterator::operator[](difference_type j) const
Returns a modifiable reference to the item at position *this +
\a{j}.
@@ -1573,8 +1573,8 @@ void **QListData::erase(void **xi)
*/
/*!
- \fn bool QList::iterator::operator==(const iterator &other) const
- \fn bool QList::iterator::operator==(const const_iterator &other) const
+ \fn template <class T> bool QList<T>::iterator::operator==(const iterator &other) const
+ \fn template <class T> bool QList<T>::iterator::operator==(const const_iterator &other) const
Returns \c true if \a other points to the same item as this
iterator; otherwise returns \c false.
@@ -1583,8 +1583,8 @@ void **QListData::erase(void **xi)
*/
/*!
- \fn bool QList::iterator::operator!=(const iterator &other) const
- \fn bool QList::iterator::operator!=(const const_iterator &other) const
+ \fn template <class T> bool QList<T>::iterator::operator!=(const iterator &other) const
+ \fn template <class T> bool QList<T>::iterator::operator!=(const const_iterator &other) const
Returns \c true if \a other points to a different item than this
iterator; otherwise returns \c false.
@@ -1593,38 +1593,38 @@ void **QListData::erase(void **xi)
*/
/*!
- \fn bool QList::iterator::operator<(const iterator& other) const
- \fn bool QList::iterator::operator<(const const_iterator& other) const
+ \fn template <class T> bool QList<T>::iterator::operator<(const iterator& other) const
+ \fn template <class T> bool QList<T>::iterator::operator<(const const_iterator& other) const
Returns \c true if the item pointed to by this iterator is less than
the item pointed to by the \a other iterator.
*/
/*!
- \fn bool QList::iterator::operator<=(const iterator& other) const
- \fn bool QList::iterator::operator<=(const const_iterator& other) const
+ \fn template <class T> bool QList<T>::iterator::operator<=(const iterator& other) const
+ \fn template <class T> bool QList<T>::iterator::operator<=(const const_iterator& other) const
Returns \c true if the item pointed to by this iterator is less than
or equal to the item pointed to by the \a other iterator.
*/
/*!
- \fn bool QList::iterator::operator>(const iterator& other) const
- \fn bool QList::iterator::operator>(const const_iterator& other) const
+ \fn template <class T> bool QList<T>::iterator::operator>(const iterator& other) const
+ \fn template <class T> bool QList<T>::iterator::operator>(const const_iterator& other) const
Returns \c true if the item pointed to by this iterator is greater
than the item pointed to by the \a other iterator.
*/
/*!
- \fn bool QList::iterator::operator>=(const iterator& other) const
- \fn bool QList::iterator::operator>=(const const_iterator& other) const
+ \fn template <class T> bool QList<T>::iterator::operator>=(const iterator& other) const
+ \fn template <class T> bool QList<T>::iterator::operator>=(const const_iterator& other) const
Returns \c true if the item pointed to by this iterator is greater
than or equal to the item pointed to by the \a other iterator.
*/
-/*! \fn QList::iterator &QList::iterator::operator++()
+/*! \fn template <class T> QList<T>::iterator &QList<T>::iterator::operator++()
The prefix ++ operator (\c{++it}) advances the iterator to the
next item in the list and returns an iterator to the new current
@@ -1635,7 +1635,7 @@ void **QListData::erase(void **xi)
\sa operator--()
*/
-/*! \fn QList::iterator QList::iterator::operator++(int)
+/*! \fn template <class T> QList<T>::iterator QList<T>::iterator::operator++(int)
\overload
@@ -1644,7 +1644,7 @@ void **QListData::erase(void **xi)
current item.
*/
-/*! \fn QList::iterator &QList::iterator::operator--()
+/*! \fn template <class T> QList<T>::iterator &QList<T>::iterator::operator--()
The prefix -- operator (\c{--it}) makes the preceding item
current and returns an iterator to the new current item.
@@ -1654,7 +1654,7 @@ void **QListData::erase(void **xi)
\sa operator++()
*/
-/*! \fn QList::iterator QList::iterator::operator--(int)
+/*! \fn template <class T> QList<T>::iterator QList<T>::iterator::operator--(int)
\overload
@@ -1662,7 +1662,7 @@ void **QListData::erase(void **xi)
current and returns an iterator to the previously current item.
*/
-/*! \fn QList::iterator &QList::iterator::operator+=(difference_type j)
+/*! \fn template <class T> QList<T>::iterator &QList<T>::iterator::operator+=(difference_type j)
Advances the iterator by \a j items. (If \a j is negative, the
iterator goes backward.)
@@ -1670,7 +1670,7 @@ void **QListData::erase(void **xi)
\sa operator-=(), operator+()
*/
-/*! \fn QList::iterator &QList::iterator::operator-=(difference_type j)
+/*! \fn template <class T> QList<T>::iterator &QList<T>::iterator::operator-=(difference_type j)
Makes the iterator go back by \a j items. (If \a j is negative,
the iterator goes forward.)
@@ -1678,7 +1678,7 @@ void **QListData::erase(void **xi)
\sa operator+=(), operator-()
*/
-/*! \fn QList::iterator QList::iterator::operator+(difference_type j) const
+/*! \fn template <class T> QList<T>::iterator QList<T>::iterator::operator+(difference_type j) const
Returns an iterator to the item at \a j positions forward from
this iterator. (If \a j is negative, the iterator goes backward.)
@@ -1686,7 +1686,7 @@ void **QListData::erase(void **xi)
\sa operator-(), operator+=()
*/
-/*! \fn QList::iterator QList::iterator::operator-(difference_type j) const
+/*! \fn template <class T> QList<T>::iterator QList<T>::iterator::operator-(difference_type j) const
Returns an iterator to the item at \a j positions backward from
this iterator. (If \a j is negative, the iterator goes forward.)
@@ -1694,7 +1694,7 @@ void **QListData::erase(void **xi)
\sa operator+(), operator-=()
*/
-/*! \fn int QList::iterator::operator-(iterator other) const
+/*! \fn template <class T> int QList<T>::iterator::operator-(iterator other) const
Returns the number of items between the item pointed to by \a
other and the item pointed to by this iterator.
@@ -1750,7 +1750,7 @@ void **QListData::erase(void **xi)
\sa QList::iterator, QListIterator
*/
-/*! \fn QList::const_iterator::const_iterator()
+/*! \fn template <class T> QList<T>::const_iterator::const_iterator()
Constructs an uninitialized iterator.
@@ -1787,36 +1787,36 @@ void **QListData::erase(void **xi)
\internal
*/
-/*! \fn QList::const_iterator::const_iterator(Node *node)
+/*! \fn template <class T> QList<T>::const_iterator::const_iterator(Node *node)
\internal
*/
-/*! \fn QList::const_iterator::const_iterator(const const_iterator &other)
+/*! \fn template <class T> QList<T>::const_iterator::const_iterator(const const_iterator &other)
Constructs a copy of \a other.
*/
-/*! \fn QList::const_iterator::const_iterator(const iterator &other)
+/*! \fn template <class T> QList<T>::const_iterator::const_iterator(const iterator &other)
Constructs a copy of \a other.
*/
-/*! \fn const T &QList::const_iterator::operator*() const
+/*! \fn template <class T> const T &QList<T>::const_iterator::operator*() const
Returns the current item.
\sa operator->()
*/
-/*! \fn const T *QList::const_iterator::operator->() const
+/*! \fn template <class T> const T *QList<T>::const_iterator::operator->() const
Returns a pointer to the current item.
\sa operator*()
*/
-/*! \fn const T &QList::const_iterator::operator[](difference_type j) const
+/*! \fn template <class T> const T &QList<T>::const_iterator::operator[](difference_type j) const
Returns the item at position *this + \a{j}.
@@ -1826,7 +1826,7 @@ void **QListData::erase(void **xi)
\sa operator+()
*/
-/*! \fn bool QList::const_iterator::operator==(const const_iterator &other) const
+/*! \fn template <class T> bool QList<T>::const_iterator::operator==(const const_iterator &other) const
Returns \c true if \a other points to the same item as this
iterator; otherwise returns \c false.
@@ -1834,7 +1834,7 @@ void **QListData::erase(void **xi)
\sa operator!=()
*/
-/*! \fn bool QList::const_iterator::operator!=(const const_iterator &other) const
+/*! \fn template <class T> bool QList<T>::const_iterator::operator!=(const const_iterator &other) const
Returns \c true if \a other points to a different item than this
iterator; otherwise returns \c false.
@@ -1843,34 +1843,34 @@ void **QListData::erase(void **xi)
*/
/*!
- \fn bool QList::const_iterator::operator<(const const_iterator& other) const
+ \fn template <class T> bool QList<T>::const_iterator::operator<(const const_iterator& other) const
Returns \c true if the item pointed to by this iterator is less than
the item pointed to by the \a other iterator.
*/
/*!
- \fn bool QList::const_iterator::operator<=(const const_iterator& other) const
+ \fn template <class T> bool QList<T>::const_iterator::operator<=(const const_iterator& other) const
Returns \c true if the item pointed to by this iterator is less than
or equal to the item pointed to by the \a other iterator.
*/
/*!
- \fn bool QList::const_iterator::operator>(const const_iterator& other) const
+ \fn template <class T> bool QList<T>::const_iterator::operator>(const const_iterator& other) const
Returns \c true if the item pointed to by this iterator is greater
than the item pointed to by the \a other iterator.
*/
/*!
- \fn bool QList::const_iterator::operator>=(const const_iterator& other) const
+ \fn template <class T> bool QList<T>::const_iterator::operator>=(const const_iterator& other) const
Returns \c true if the item pointed to by this iterator is greater
than or equal to the item pointed to by the \a other iterator.
*/
-/*! \fn QList::const_iterator &QList::const_iterator::operator++()
+/*! \fn template <class T> QList<T>::const_iterator &QList<T>::const_iterator::operator++()
The prefix ++ operator (\c{++it}) advances the iterator to the
next item in the list and returns an iterator to the new current
@@ -1881,7 +1881,7 @@ void **QListData::erase(void **xi)
\sa operator--()
*/
-/*! \fn QList::const_iterator QList::const_iterator::operator++(int)
+/*! \fn template <class T> QList<T>::const_iterator QList<T>::const_iterator::operator++(int)
\overload
@@ -1890,7 +1890,7 @@ void **QListData::erase(void **xi)
current item.
*/
-/*! \fn QList::const_iterator &QList::const_iterator::operator--()
+/*! \fn template <class T> QList<T>::const_iterator &QList<T>::const_iterator::operator--()
The prefix -- operator (\c{--it}) makes the preceding item
current and returns an iterator to the new current item.
@@ -1900,7 +1900,7 @@ void **QListData::erase(void **xi)
\sa operator++()
*/
-/*! \fn QList::const_iterator QList::const_iterator::operator--(int)
+/*! \fn template <class T> QList<T>::const_iterator QList<T>::const_iterator::operator--(int)
\overload
@@ -1908,7 +1908,7 @@ void **QListData::erase(void **xi)
current and returns an iterator to the previously current item.
*/
-/*! \fn QList::const_iterator &QList::const_iterator::operator+=(difference_type j)
+/*! \fn template <class T> QList<T>::const_iterator &QList<T>::const_iterator::operator+=(difference_type j)
Advances the iterator by \a j items. (If \a j is negative, the
iterator goes backward.)
@@ -1916,7 +1916,7 @@ void **QListData::erase(void **xi)
\sa operator-=(), operator+()
*/
-/*! \fn QList::const_iterator &QList::const_iterator::operator-=(difference_type j)
+/*! \fn template <class T> QList<T>::const_iterator &QList<T>::const_iterator::operator-=(difference_type j)
Makes the iterator go back by \a j items. (If \a j is negative,
the iterator goes forward.)
@@ -1924,7 +1924,7 @@ void **QListData::erase(void **xi)
\sa operator+=(), operator-()
*/
-/*! \fn QList::const_iterator QList::const_iterator::operator+(difference_type j) const
+/*! \fn template <class T> QList<T>::const_iterator QList<T>::const_iterator::operator+(difference_type j) const
Returns an iterator to the item at \a j positions forward from
this iterator. (If \a j is negative, the iterator goes backward.)
@@ -1932,7 +1932,7 @@ void **QListData::erase(void **xi)
\sa operator-(), operator+=()
*/
-/*! \fn QList::const_iterator QList::const_iterator::operator-(difference_type j) const
+/*! \fn template <class T> QList<T>::const_iterator QList<T>::const_iterator::operator-(difference_type j) const
Returns an iterator to the item at \a j positions backward from
this iterator. (If \a j is negative, the iterator goes forward.)
@@ -1940,13 +1940,13 @@ void **QListData::erase(void **xi)
\sa operator+(), operator-=()
*/
-/*! \fn int QList::const_iterator::operator-(const_iterator other) const
+/*! \fn template <class T> int QList<T>::const_iterator::operator-(const_iterator other) const
Returns the number of items between the item pointed to by \a
other and the item pointed to by this iterator.
*/
-/*! \fn QDataStream &operator<<(QDataStream &out, const QList<T> &list)
+/*! \fn template <class T> QDataStream &operator<<(QDataStream &out, const QList<T> &list)
\relates QList
Writes the list \a list to stream \a out.
@@ -1957,7 +1957,7 @@ void **QListData::erase(void **xi)
\sa{Serializing Qt Data Types}{Format of the QDataStream operators}
*/
-/*! \fn QDataStream &operator>>(QDataStream &in, QList<T> &list)
+/*! \fn template <class T> QDataStream &operator>>(QDataStream &in, QList<T> &list)
\relates QList
Reads a list from stream \a in into \a list.
@@ -1968,7 +1968,7 @@ void **QListData::erase(void **xi)
\sa{Serializing Qt Data Types}{Format of the QDataStream operators}
*/
-/*! \fn QList<T> QList<T>::fromVector(const QVector<T> &vector)
+/*! \fn template <class T> QList<T> QList<T>::fromVector(const QVector<T> &vector)
Returns a QList object with the data contained in \a vector.
@@ -1979,7 +1979,7 @@ void **QListData::erase(void **xi)
\sa fromSet(), toVector(), QVector::toList()
*/
-/*! \fn QVector<T> QList<T>::toVector() const
+/*! \fn template <class T> QVector<T> QList<T>::toVector() const
Returns a QVector object with the data contained in this QList.
@@ -1990,7 +1990,7 @@ void **QListData::erase(void **xi)
\sa toSet(), fromVector(), QVector::fromList()
*/
-/*! \fn QList<T> QList<T>::fromSet(const QSet<T> &set)
+/*! \fn template <class T> QList<T> QList<T>::fromSet(const QSet<T> &set)
Returns a QList object with the data contained in \a set. The
order of the elements in the QList is undefined.
@@ -2002,7 +2002,7 @@ void **QListData::erase(void **xi)
\sa fromVector(), toSet(), QSet::toList()
*/
-/*! \fn QSet<T> QList<T>::toSet() const
+/*! \fn template <class T> QSet<T> QList<T>::toSet() const
Returns a QSet object with the data contained in this QList.
Since QSet doesn't allow duplicates, the resulting QSet might be
@@ -2015,7 +2015,7 @@ void **QListData::erase(void **xi)
\sa toVector(), fromSet(), QSet::fromList()
*/
-/*! \fn QList<T> QList<T>::fromStdList(const std::list<T> &list)
+/*! \fn template <class T> QList<T> QList<T>::fromStdList(const std::list<T> &list)
Returns a QList object with the data contained in \a list. The
order of the elements in the QList is the same as in \a list.
@@ -2027,7 +2027,7 @@ void **QListData::erase(void **xi)
\sa toStdList(), QVector::fromStdVector()
*/
-/*! \fn std::list<T> QList<T>::toStdList() const
+/*! \fn template <class T> std::list<T> QList<T>::toStdList() const
Returns a std::list object with the data contained in this QList.
Example: