From b23c52ea8110f05def21713934fcc6131f44ec6a Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 13 Sep 2017 12:07:28 +0200 Subject: Add template text to \fn commands in container classes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ƶ --- src/corelib/tools/qhash.cpp | 250 ++++++++++---------- src/corelib/tools/qiterator.qdoc | 472 ++++++++++++++++++++++++-------------- src/corelib/tools/qlinkedlist.cpp | 211 +++++++++-------- src/corelib/tools/qlist.cpp | 294 ++++++++++++------------ src/corelib/tools/qset.qdoc | 196 ++++++++-------- src/corelib/tools/qvector.qdoc | 220 +++++++++--------- 6 files changed, 882 insertions(+), 761 deletions(-) (limited to 'src') diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 501f0d345f..e110a6095f 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -1242,7 +1242,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa QHashIterator, QMutableHashIterator, QMap, QSet */ -/*! \fn QHash::QHash() +/*! \fn template QHash::QHash() Constructs an empty hash. @@ -1250,7 +1250,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn QHash::QHash(QHash &&other) + \fn template QHash::QHash(QHash &&other) Move-constructs a QHash instance, making it point at the same object that \a other was pointing to. @@ -1258,7 +1258,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \since 5.2 */ -/*! \fn QHash::QHash(std::initializer_list > list) +/*! \fn template QHash::QHash(std::initializer_list > list) \since 5.1 Constructs a hash with a copy of each of the elements in the @@ -1268,7 +1268,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW compiled in C++11 mode. */ -/*! \fn QHash::QHash(const QHash &other) +/*! \fn template QHash::QHash(const QHash &other) Constructs a copy of \a other. @@ -1280,40 +1280,40 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator=() */ -/*! \fn QHash::~QHash() +/*! \fn template QHash::~QHash() Destroys the hash. References to the values in the hash and all iterators of this hash become invalid. */ -/*! \fn QHash &QHash::operator=(const QHash &other) +/*! \fn template QHash &QHash::operator=(const QHash &other) Assigns \a other to this hash and returns a reference to this hash. */ /*! - \fn QHash &QHash::operator=(QHash &&other) + \fn template QHash &QHash::operator=(QHash &&other) Move-assigns \a other to this QHash instance. \since 5.2 */ -/*! \fn void QHash::swap(QHash &other) +/*! \fn template void QHash::swap(QHash &other) \since 4.8 Swaps hash \a other with this hash. This operation is very fast and never fails. */ -/*! \fn void QMultiHash::swap(QMultiHash &other) +/*! \fn template void QMultiHash::swap(QMultiHash &other) \since 4.8 Swaps hash \a other with this hash. This operation is very fast and never fails. */ -/*! \fn bool QHash::operator==(const QHash &other) const +/*! \fn template bool QHash::operator==(const QHash &other) const Returns \c true if \a other is equal to this hash; otherwise returns false. @@ -1326,7 +1326,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator!=() */ -/*! \fn bool QHash::operator!=(const QHash &other) const +/*! \fn template bool QHash::operator!=(const QHash &other) const Returns \c true if \a other is not equal to this hash; otherwise returns \c false. @@ -1339,14 +1339,14 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator==() */ -/*! \fn int QHash::size() const +/*! \fn template int QHash::size() const Returns the number of items in the hash. \sa isEmpty(), count() */ -/*! \fn bool QHash::isEmpty() const +/*! \fn template bool QHash::isEmpty() const Returns \c true if the hash contains no items; otherwise returns false. @@ -1354,7 +1354,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa size() */ -/*! \fn int QHash::capacity() const +/*! \fn template int QHash::capacity() const Returns the number of buckets in the QHash's internal hash table. @@ -1366,7 +1366,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa reserve(), squeeze() */ -/*! \fn void QHash::reserve(int size) +/*! \fn template void QHash::reserve(int size) Ensures that the QHash's internal hash table consists of at least \a size buckets. @@ -1389,7 +1389,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa squeeze(), capacity() */ -/*! \fn void QHash::squeeze() +/*! \fn template void QHash::squeeze() Reduces the size of the QHash's internal hash table to save memory. @@ -1401,7 +1401,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa reserve(), capacity() */ -/*! \fn void QHash::detach() +/*! \fn template void QHash::detach() \internal @@ -1411,7 +1411,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa isDetached() */ -/*! \fn bool QHash::isDetached() const +/*! \fn template bool QHash::isDetached() const \internal @@ -1421,24 +1421,24 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa detach() */ -/*! \fn void QHash::setSharable(bool sharable) +/*! \fn template void QHash::setSharable(bool sharable) \internal */ -/*! \fn bool QHash::isSharedWith(const QHash &other) const +/*! \fn template bool QHash::isSharedWith(const QHash &other) const \internal */ -/*! \fn void QHash::clear() +/*! \fn template void QHash::clear() Removes all items from the hash. \sa remove() */ -/*! \fn int QHash::remove(const Key &key) +/*! \fn template int QHash::remove(const Key &key) Removes all the items that have the \a key from the hash. Returns the number of items removed which is usually 1 but will @@ -1448,7 +1448,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa clear(), take(), QMultiHash::remove() */ -/*! \fn T QHash::take(const Key &key) +/*! \fn template T QHash::take(const Key &key) Removes the item with the \a key from the hash and returns the value associated with it. @@ -1463,7 +1463,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa remove() */ -/*! \fn bool QHash::contains(const Key &key) const +/*! \fn template bool QHash::contains(const Key &key) const Returns \c true if the hash contains an item with the \a key; otherwise returns \c false. @@ -1471,7 +1471,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa count(), QMultiHash::contains() */ -/*! \fn const T QHash::value(const Key &key) const +/*! \fn template const T QHash::value(const Key &key) const Returns the value associated with the \a key. @@ -1483,14 +1483,14 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa key(), values(), contains(), operator[]() */ -/*! \fn const T QHash::value(const Key &key, const T &defaultValue) const +/*! \fn template const T QHash::value(const Key &key, const T &defaultValue) const \overload If the hash contains no item with the given \a key, the function returns \a defaultValue. */ -/*! \fn T &QHash::operator[](const Key &key) +/*! \fn template T &QHash::operator[](const Key &key) Returns the value associated with the \a key as a modifiable reference. @@ -1504,14 +1504,14 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa insert(), value() */ -/*! \fn const T QHash::operator[](const Key &key) const +/*! \fn template const T QHash::operator[](const Key &key) const \overload Same as value(). */ -/*! \fn QList QHash::uniqueKeys() const +/*! \fn template QList QHash::uniqueKeys() const \since 4.2 Returns a list containing all the keys in the map. Keys that occur multiple @@ -1521,7 +1521,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa keys(), values() */ -/*! \fn QList QHash::keys() const +/*! \fn template QList QHash::keys() const Returns a list containing all the keys in the hash, in an arbitrary order. Keys that occur multiple times in the hash @@ -1536,7 +1536,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa uniqueKeys(), values(), key() */ -/*! \fn QList QHash::keys(const T &value) const +/*! \fn template QList QHash::keys(const T &value) const \overload @@ -1548,7 +1548,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW by value. */ -/*! \fn QList QHash::values() const +/*! \fn template QList QHash::values() const Returns a list containing all the values in the hash, in an arbitrary order. If a key is associated with multiple values, all of @@ -1560,7 +1560,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa keys(), value() */ -/*! \fn QList QHash::values(const Key &key) const +/*! \fn template QList QHash::values(const Key &key) const \overload @@ -1570,7 +1570,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa count(), insertMulti() */ -/*! \fn Key QHash::key(const T &value) const +/*! \fn template Key QHash::key(const T &value) const Returns the first key mapped to \a value. @@ -1585,7 +1585,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn Key QHash::key(const T &value, const Key &defaultKey) const + \fn template Key QHash::key(const T &value, const Key &defaultKey) const \since 4.3 \overload @@ -1597,21 +1597,21 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW by value. */ -/*! \fn int QHash::count(const Key &key) const +/*! \fn template int QHash::count(const Key &key) const Returns the number of items associated with the \a key. \sa contains(), insertMulti() */ -/*! \fn int QHash::count() const +/*! \fn template int QHash::count() const \overload Same as size(). */ -/*! \fn QHash::iterator QHash::begin() +/*! \fn template QHash::iterator QHash::begin() Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash. @@ -1619,12 +1619,12 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa constBegin(), end() */ -/*! \fn QHash::const_iterator QHash::begin() const +/*! \fn template QHash::const_iterator QHash::begin() const \overload */ -/*! \fn QHash::const_iterator QHash::cbegin() const +/*! \fn template QHash::const_iterator QHash::cbegin() const \since 5.0 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item @@ -1633,7 +1633,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa begin(), cend() */ -/*! \fn QHash::const_iterator QHash::constBegin() const +/*! \fn template QHash::const_iterator QHash::constBegin() const Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash. @@ -1641,7 +1641,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa begin(), constEnd() */ -/*! \fn QHash::key_iterator QHash::keyBegin() const +/*! \fn template QHash::key_iterator QHash::keyBegin() const \since 5.6 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first key @@ -1650,7 +1650,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa keyEnd() */ -/*! \fn QHash::iterator QHash::end() +/*! \fn template QHash::iterator QHash::end() Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the hash. @@ -1658,12 +1658,12 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa begin(), constEnd() */ -/*! \fn QHash::const_iterator QHash::end() const +/*! \fn template QHash::const_iterator QHash::end() const \overload */ -/*! \fn QHash::const_iterator QHash::constEnd() const +/*! \fn template QHash::const_iterator QHash::constEnd() const Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the hash. @@ -1671,7 +1671,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa constBegin(), end() */ -/*! \fn QHash::const_iterator QHash::cend() const +/*! \fn template QHash::const_iterator QHash::cend() const \since 5.0 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary @@ -1680,7 +1680,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa cbegin(), end() */ -/*! \fn QHash::key_iterator QHash::keyEnd() const +/*! \fn template QHash::key_iterator QHash::keyEnd() const \since 5.6 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary @@ -1689,7 +1689,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa keyBegin() */ -/*! \fn QHash::key_value_iterator QHash::keyValueBegin() +/*! \fn template QHash::key_value_iterator QHash::keyValueBegin() \since 5.10 Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first entry @@ -1698,7 +1698,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa keyValueEnd() */ -/*! \fn QHash::key_value_iterator QHash::keyValueEnd() +/*! \fn template QHash::key_value_iterator QHash::keyValueEnd() \since 5.10 Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary @@ -1707,7 +1707,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa keyValueBegin() */ -/*! \fn QHash::const_key_value_iterator QHash::keyValueBegin() const +/*! \fn template QHash::const_key_value_iterator QHash::keyValueBegin() const \since 5.10 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first entry @@ -1716,7 +1716,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa keyValueEnd() */ -/*! \fn QHash::const_key_value_iterator QHash::constKeyValueBegin() const +/*! \fn template QHash::const_key_value_iterator QHash::constKeyValueBegin() const \since 5.10 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first entry @@ -1725,7 +1725,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa keyValueBegin() */ -/*! \fn QHash::const_key_value_iterator QHash::keyValueEnd() const +/*! \fn template QHash::const_key_value_iterator QHash::keyValueEnd() const \since 5.10 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary @@ -1734,7 +1734,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa keyValueBegin() */ -/*! \fn QHash::const_key_value_iterator QHash::constKeyValueEnd() const +/*! \fn template QHash::const_key_value_iterator QHash::constKeyValueEnd() const \since 5.10 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary @@ -1743,7 +1743,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa constKeyValueBegin() */ -/*! \fn QHash::iterator QHash::erase(const_iterator pos) +/*! \fn template QHash::iterator QHash::erase(const_iterator pos) \since 5.7 Removes the (key, value) pair associated with the iterator \a pos @@ -1760,11 +1760,11 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa remove(), take(), find() */ -/*! \fn QHash::iterator QHash::erase(iterator pos) +/*! \fn template QHash::iterator QHash::erase(iterator pos) \overload */ -/*! \fn QHash::iterator QHash::find(const Key &key) +/*! \fn template QHash::iterator QHash::find(const Key &key) Returns an iterator pointing to the item with the \a key in the hash. @@ -1783,12 +1783,12 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa value(), values(), QMultiHash::find() */ -/*! \fn QHash::const_iterator QHash::find(const Key &key) const +/*! \fn template QHash::const_iterator QHash::find(const Key &key) const \overload */ -/*! \fn QHash::const_iterator QHash::constFind(const Key &key) const +/*! \fn template QHash::const_iterator QHash::constFind(const Key &key) const \since 4.1 Returns an iterator pointing to the item with the \a key in the @@ -1800,7 +1800,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa find(), QMultiHash::constFind() */ -/*! \fn QHash::iterator QHash::insert(const Key &key, const T &value) +/*! \fn template QHash::iterator QHash::insert(const Key &key, const T &value) Inserts a new item with the \a key and a value of \a value. @@ -1813,7 +1813,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa insertMulti() */ -/*! \fn QHash::iterator QHash::insertMulti(const Key &key, const T &value) +/*! \fn template QHash::iterator QHash::insertMulti(const Key &key, const T &value) Inserts a new item with the \a key and a value of \a value. @@ -1825,7 +1825,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa insert(), values() */ -/*! \fn QHash &QHash::unite(const QHash &other) +/*! \fn template QHash &QHash::unite(const QHash &other) Inserts all the items in the \a other hash into this hash. If a key is common to both hashes, the resulting hash will contain the @@ -1834,14 +1834,14 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa insertMulti() */ -/*! \fn bool QHash::empty() const +/*! \fn template bool QHash::empty() const This function is provided for STL compatibility. It is equivalent to isEmpty(), returning true if the hash is empty; otherwise returns \c false. */ -/*! \fn QPair QHash::equal_range(const Key &key) +/*! \fn template QPair QHash::equal_range(const Key &key) \since 5.7 Returns a pair of iterators delimiting the range of values \c{[first, second)}, that @@ -1849,7 +1849,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn QPair QHash::equal_range(const Key &key) const + \fn template QPair QHash::equal_range(const Key &key) const \overload \since 5.7 */ @@ -2020,7 +2020,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa QHash::const_iterator, QHash::key_iterator, QMutableHashIterator */ -/*! \fn QHash::iterator::iterator() +/*! \fn template QHash::iterator::iterator() Constructs an uninitialized iterator. @@ -2031,12 +2031,12 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa QHash::begin(), QHash::end() */ -/*! \fn QHash::iterator::iterator(void *node) +/*! \fn template QHash::iterator::iterator(void *node) \internal */ -/*! \fn const Key &QHash::iterator::key() const +/*! \fn template const Key &QHash::iterator::key() const Returns the current item's key as a const reference. @@ -2047,7 +2047,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa value() */ -/*! \fn T &QHash::iterator::value() const +/*! \fn template T &QHash::iterator::value() const Returns a modifiable reference to the current item's value. @@ -2059,7 +2059,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa key(), operator*() */ -/*! \fn T &QHash::iterator::operator*() const +/*! \fn template T &QHash::iterator::operator*() const Returns a modifiable reference to the current item's value. @@ -2068,7 +2068,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa key() */ -/*! \fn T *QHash::iterator::operator->() const +/*! \fn template T *QHash::iterator::operator->() const Returns a pointer to the current item's value. @@ -2076,8 +2076,8 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn bool QHash::iterator::operator==(const iterator &other) const - \fn bool QHash::iterator::operator==(const const_iterator &other) const + \fn template bool QHash::iterator::operator==(const iterator &other) const + \fn template bool QHash::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. @@ -2086,8 +2086,8 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn bool QHash::iterator::operator!=(const iterator &other) const - \fn bool QHash::iterator::operator!=(const const_iterator &other) const + \fn template bool QHash::iterator::operator!=(const iterator &other) const + \fn template bool QHash::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. @@ -2096,7 +2096,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn QHash::iterator &QHash::iterator::operator++() + \fn template QHash::iterator &QHash::iterator::operator++() The prefix ++ operator (\c{++i}) advances the iterator to the next item in the hash and returns an iterator to the new current @@ -2107,7 +2107,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator--() */ -/*! \fn QHash::iterator QHash::iterator::operator++(int) +/*! \fn template QHash::iterator QHash::iterator::operator++(int) \overload @@ -2117,7 +2117,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn QHash::iterator &QHash::iterator::operator--() + \fn template QHash::iterator &QHash::iterator::operator--() The prefix -- operator (\c{--i}) makes the preceding item current and returns an iterator pointing to the new current item. @@ -2129,7 +2129,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn QHash::iterator QHash::iterator::operator--(int) + \fn template QHash::iterator QHash::iterator::operator--(int) \overload @@ -2138,7 +2138,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW current item. */ -/*! \fn QHash::iterator QHash::iterator::operator+(int j) const +/*! \fn template QHash::iterator QHash::iterator::operator+(int 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.) @@ -2149,7 +2149,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ -/*! \fn QHash::iterator QHash::iterator::operator-(int j) const +/*! \fn template QHash::iterator QHash::iterator::operator-(int 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.) @@ -2159,7 +2159,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator+() */ -/*! \fn QHash::iterator &QHash::iterator::operator+=(int j) +/*! \fn template QHash::iterator &QHash::iterator::operator+=(int j) Advances the iterator by \a j items. (If \a j is negative, the iterator goes backward.) @@ -2167,7 +2167,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator-=(), operator+() */ -/*! \fn QHash::iterator &QHash::iterator::operator-=(int j) +/*! \fn template QHash::iterator &QHash::iterator::operator-=(int j) Makes the iterator go back by \a j items. (If \a j is negative, the iterator goes forward.) @@ -2222,7 +2222,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa QHash::iterator, QHashIterator */ -/*! \fn QHash::const_iterator::const_iterator() +/*! \fn template QHash::const_iterator::const_iterator() Constructs an uninitialized iterator. @@ -2233,31 +2233,31 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa QHash::constBegin(), QHash::constEnd() */ -/*! \fn QHash::const_iterator::const_iterator(void *node) +/*! \fn template QHash::const_iterator::const_iterator(void *node) \internal */ -/*! \fn QHash::const_iterator::const_iterator(const iterator &other) +/*! \fn template QHash::const_iterator::const_iterator(const iterator &other) Constructs a copy of \a other. */ -/*! \fn const Key &QHash::const_iterator::key() const +/*! \fn template const Key &QHash::const_iterator::key() const Returns the current item's key. \sa value() */ -/*! \fn const T &QHash::const_iterator::value() const +/*! \fn template const T &QHash::const_iterator::value() const Returns the current item's value. \sa key(), operator*() */ -/*! \fn const T &QHash::const_iterator::operator*() const +/*! \fn template const T &QHash::const_iterator::operator*() const Returns the current item's value. @@ -2266,14 +2266,14 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa key() */ -/*! \fn const T *QHash::const_iterator::operator->() const +/*! \fn template const T *QHash::const_iterator::operator->() const Returns a pointer to the current item's value. \sa value() */ -/*! \fn bool QHash::const_iterator::operator==(const const_iterator &other) const +/*! \fn template bool QHash::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. @@ -2281,7 +2281,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator!=() */ -/*! \fn bool QHash::const_iterator::operator!=(const const_iterator &other) const +/*! \fn template bool QHash::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. @@ -2290,7 +2290,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn QHash::const_iterator &QHash::const_iterator::operator++() + \fn template QHash::const_iterator &QHash::const_iterator::operator++() The prefix ++ operator (\c{++i}) advances the iterator to the next item in the hash and returns an iterator to the new current @@ -2301,7 +2301,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator--() */ -/*! \fn QHash::const_iterator QHash::const_iterator::operator++(int) +/*! \fn template QHash::const_iterator QHash::const_iterator::operator++(int) \overload @@ -2310,7 +2310,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW current item. */ -/*! \fn QHash::const_iterator &QHash::const_iterator::operator--() +/*! \fn template QHash::const_iterator &QHash::const_iterator::operator--() The prefix -- operator (\c{--i}) makes the preceding item current and returns an iterator pointing to the new current item. @@ -2321,7 +2321,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator++() */ -/*! \fn QHash::const_iterator QHash::const_iterator::operator--(int) +/*! \fn template QHash::const_iterator QHash::const_iterator::operator--(int) \overload @@ -2330,7 +2330,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW current item. */ -/*! \fn QHash::const_iterator QHash::const_iterator::operator+(int j) const +/*! \fn template QHash::const_iterator QHash::const_iterator::operator+(int 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.) @@ -2340,7 +2340,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator-() */ -/*! \fn QHash::const_iterator QHash::const_iterator::operator-(int j) const +/*! \fn template QHash::const_iterator QHash::const_iterator::operator-(int 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.) @@ -2350,7 +2350,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator+() */ -/*! \fn QHash::const_iterator &QHash::const_iterator::operator+=(int j) +/*! \fn template QHash::const_iterator &QHash::const_iterator::operator+=(int j) Advances the iterator by \a j items. (If \a j is negative, the iterator goes backward.) @@ -2360,7 +2360,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator-=(), operator+() */ -/*! \fn QHash::const_iterator &QHash::const_iterator::operator-=(int j) +/*! \fn template QHash::const_iterator &QHash::const_iterator::operator-=(int j) Makes the iterator go back by \a j items. (If \a j is negative, the iterator goes forward.) @@ -2407,17 +2407,17 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa QHash::const_iterator, QHash::iterator */ -/*! \fn const T &QHash::key_iterator::operator*() const +/*! \fn template const T &QHash::key_iterator::operator*() const Returns the current item's key. */ -/*! \fn const T *QHash::key_iterator::operator->() const +/*! \fn template const T *QHash::key_iterator::operator->() const Returns a pointer to the current item's key. */ -/*! \fn bool QHash::key_iterator::operator==(key_iterator other) const +/*! \fn template bool QHash::key_iterator::operator==(key_iterator other) const Returns \c true if \a other points to the same item as this iterator; otherwise returns \c false. @@ -2425,7 +2425,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator!=() */ -/*! \fn bool QHash::key_iterator::operator!=(key_iterator other) const +/*! \fn template bool QHash::key_iterator::operator!=(key_iterator other) const Returns \c true if \a other points to a different item than this iterator; otherwise returns \c false. @@ -2434,7 +2434,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn QHash::key_iterator &QHash::key_iterator::operator++() + \fn template QHash::key_iterator &QHash::key_iterator::operator++() The prefix ++ operator (\c{++i}) advances the iterator to the next item in the hash and returns an iterator to the new current @@ -2445,7 +2445,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator--() */ -/*! \fn QHash::key_iterator QHash::key_iterator::operator++(int) +/*! \fn template QHash::key_iterator QHash::key_iterator::operator++(int) \overload @@ -2454,7 +2454,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW item. */ -/*! \fn QHash::key_iterator &QHash::key_iterator::operator--() +/*! \fn template QHash::key_iterator &QHash::key_iterator::operator--() The prefix -- operator (\c{--i}) makes the preceding item current and returns an iterator pointing to the new current item. @@ -2465,7 +2465,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator++() */ -/*! \fn QHash::key_iterator QHash::key_iterator::operator--(int) +/*! \fn template QHash::key_iterator QHash::key_iterator::operator--(int) \overload @@ -2474,7 +2474,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW item. */ -/*! \fn const_iterator QHash::key_iterator::base() const +/*! \fn template const_iterator QHash::key_iterator::base() const Returns the underlying const_iterator this key_iterator is based on. */ @@ -2490,7 +2490,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa QKeyValueIterator */ -/*! \fn QDataStream &operator<<(QDataStream &out, const QHash& hash) +/*! \fn template QDataStream &operator<<(QDataStream &out, const QHash& hash) \relates QHash Writes the hash \a hash to stream \a out. @@ -2501,7 +2501,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa {Serializing Qt Data Types} */ -/*! \fn QDataStream &operator>>(QDataStream &in, QHash &hash) +/*! \fn template QDataStream &operator>>(QDataStream &in, QHash &hash) \relates QHash Reads a hash from stream \a in into \a hash. @@ -2568,12 +2568,12 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa QHash, QHashIterator, QMutableHashIterator, QMultiMap */ -/*! \fn QMultiHash::QMultiHash() +/*! \fn template QMultiHash::QMultiHash() Constructs an empty hash. */ -/*! \fn QMultiHash::QMultiHash(std::initializer_list > list) +/*! \fn template QMultiHash::QMultiHash(std::initializer_list > list) \since 5.1 Constructs a multi-hash with a copy of each of the elements in the @@ -2583,7 +2583,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW compiled in C++11 mode. */ -/*! \fn QMultiHash::QMultiHash(const QHash &other) +/*! \fn template QMultiHash::QMultiHash(const QHash &other) Constructs a copy of \a other (which can be a QHash or a QMultiHash). @@ -2591,7 +2591,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa operator=() */ -/*! \fn QMultiHash::iterator QMultiHash::replace(const Key &key, const T &value) +/*! \fn template QMultiHash::iterator QMultiHash::replace(const Key &key, const T &value) Inserts a new item with the \a key and a value of \a value. @@ -2604,7 +2604,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa insert() */ -/*! \fn QMultiHash::iterator QMultiHash::insert(const Key &key, const T &value) +/*! \fn template QMultiHash::iterator QMultiHash::insert(const Key &key, const T &value) Inserts a new item with the \a key and a value of \a value. @@ -2616,7 +2616,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa replace() */ -/*! \fn QMultiHash &QMultiHash::operator+=(const QMultiHash &other) +/*! \fn template QMultiHash &QMultiHash::operator+=(const QMultiHash &other) Inserts all the items in the \a other hash into this hash and returns a reference to this hash. @@ -2624,7 +2624,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW \sa insert() */ -/*! \fn QMultiHash QMultiHash::operator+(const QMultiHash &other) const +/*! \fn template QMultiHash QMultiHash::operator+(const QMultiHash &other) const Returns a hash that contains all the items in this hash in addition to all the items in \a other. If a key is common to both @@ -2634,7 +2634,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn bool QMultiHash::contains(const Key &key, const T &value) const + \fn template bool QMultiHash::contains(const Key &key, const T &value) const \since 4.3 Returns \c true if the hash contains an item with the \a key and @@ -2644,7 +2644,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn int QMultiHash::remove(const Key &key, const T &value) + \fn template int QMultiHash::remove(const Key &key, const T &value) \since 4.3 Removes all the items that have the \a key and the value \a @@ -2654,7 +2654,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn int QMultiHash::count(const Key &key, const T &value) const + \fn template int QMultiHash::count(const Key &key, const T &value) const \since 4.3 Returns the number of items with the \a key and \a value. @@ -2663,7 +2663,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn typename QHash::iterator QMultiHash::find(const Key &key, const T &value) + \fn template typename QHash::iterator QMultiHash::find(const Key &key, const T &value) \since 4.3 Returns an iterator pointing to the item with the \a key and \a value. @@ -2676,13 +2676,13 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn typename QHash::const_iterator QMultiHash::find(const Key &key, const T &value) const + \fn template typename QHash::const_iterator QMultiHash::find(const Key &key, const T &value) const \since 4.3 \overload */ /*! - \fn typename QHash::const_iterator QMultiHash::constFind(const Key &key, const T &value) const + \fn template typename QHash::const_iterator QMultiHash::constFind(const Key &key, const T &value) const \since 4.3 Returns an iterator pointing to the item with the \a key and the @@ -2695,7 +2695,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn uint qHash(const QHash &key, uint seed = 0) + \fn template uint qHash(const QHash &key, uint seed = 0) \since 5.8 \relates QHash @@ -2705,7 +2705,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW */ /*! - \fn uint qHash(const QMultiHash &key, uint seed = 0) + \fn template uint qHash(const QMultiHash &key, uint seed = 0) \since 5.8 \relates QMultiHash diff --git a/src/corelib/tools/qiterator.qdoc b/src/corelib/tools/qiterator.qdoc index 77cc412602..1a70784fab 100644 --- a/src/corelib/tools/qiterator.qdoc +++ b/src/corelib/tools/qiterator.qdoc @@ -25,6 +25,128 @@ ** ****************************************************************************/ +/*! \class QKeyValueIterator + \inmodule QtCore + \since 5.10 + + \brief Iterator over the key/value pairs of an associative container. + + The QKeyValueIterator class provides an STL-style iterator for returning + key/value pairs from associative containers like QHash and QMap. It + supports the same API as the STL associative containers, i.e. getting a + key/value pair when iterating through the container. + + This will allow for better interoperability between QMap, QHash and friends + and STL-style algorithms. + + \warning Iterators on implicitly shared containers do not work + exactly like STL-iterators. You should avoid copying a container + while iterators are active on that container. For more information, + read \l{Implicit sharing iterator problem}. +*/ + +/*! \typedef QKeyValueIterator::iterator_category + \internal +*/ + +/*! \typedef QKeyValueIterator::difference_type + \internal +*/ + +/*! \typedef QKeyValueIterator::value_type + \internal +*/ + +/*! \typedef QKeyValueIterator::pointer + \internal +*/ + +/*! \typedef QKeyValueIterator::reference + \internal +*/ + +/*! \fn template QKeyValueIterator::QKeyValueIterator() + + Constructs a default QKeyValueIterator. +*/ + +/*! \fn template QKeyValueIterator::QKeyValueIterator(Iterator o) + + Constructs a QKeyValueIterator on top of \a o. +*/ + +/*! \fn template const T &QKeyValueIterator::operator*() const + + Returns the current entry as a pair. +*/ + +/*! \fn template bool operator==(QKeyValueIterator lhs, QKeyValueIterator rhs) + \relates QKeyValueIterator + + Returns \c true if \a rhs points to the same item as \a lhs otherwise returns + \c false. + + \sa operator!=() +*/ + +/*! \fn template bool operator!=(QKeyValueIterator lhs, QKeyValueIterator rhs) const + \relates QKeyValueIterator + + Returns \c true if \a rhs points to a different item than \a lhs otherwise + returns \c false. + + \sa operator==() +*/ + +/*! + \fn template QKeyValueIterator &QKeyValueIterator::operator++() + + The prefix ++ operator (\c{++i}) advances the iterator to the + next item in the container and returns the iterator. + + \note Advancing the iterator past its container's end() constitutes + undefined behavior. + + \sa operator--() +*/ + +/*! \fn template QKeyValueIterator QKeyValueIterator::operator++(int) + + \overload + + The postfix ++ operator (\c{i++}) advances the iterator to the + next item in the container and returns the iterator's prior value. + + \note Advancing the iterator past its container's end() constitutes + undefined behavior. +*/ + +/*! \fn template QKeyValueIterator &QKeyValueIterator::operator--() + + The prefix -- operator (\c{--i}) backs the iterator up to the previous item + in the container and returns the iterator. + + \note Backing up an iterator to before its container's begin() constitutes + undefined behavior. + + \sa operator++() +*/ + +/*! \fn template QKeyValueIterator QKeyValueIterator::operator--(int) + + \overload + + The postfix -- operator (\c{i--}) backs the iterator up to the previous item + in the container and returns the iterator's prior value. + + \note Backing up an iterator to before its container's begin() constitutes + undefined behavior. +*/ + +/*! \fn template Iterator QKeyValueIterator::base() const + Returns the underlying iterator this QKeyValueIterator is based on. +*/ + /*! \class QListIterator \inmodule QtCore @@ -470,10 +592,10 @@ */ /*! - \fn QListIterator::QListIterator(const QList &list) - \fn QLinkedListIterator::QLinkedListIterator(const QLinkedList &list) - \fn QMutableListIterator::QMutableListIterator(QList &list) - \fn QMutableLinkedListIterator::QMutableLinkedListIterator(QLinkedList &list) + \fn template QListIterator::QListIterator(const QList &list) + \fn template QLinkedListIterator::QLinkedListIterator(const QLinkedList &list) + \fn template QMutableListIterator::QMutableListIterator(QList &list) + \fn template QMutableLinkedListIterator::QMutableLinkedListIterator(QLinkedList &list) Constructs an iterator for traversing \a list. The iterator is set to be at the front of the list (before the first item). @@ -482,8 +604,8 @@ */ /*! - \fn QVectorIterator::QVectorIterator(const QVector &vector) - \fn QMutableVectorIterator::QMutableVectorIterator(QVector &vector) + \fn template QVectorIterator::QVectorIterator(const QVector &vector) + \fn template QMutableVectorIterator::QMutableVectorIterator(QVector &vector) Constructs an iterator for traversing \a vector. The iterator is set to be at the front of the vector (before the first item). @@ -492,8 +614,8 @@ */ /*! - \fn QSetIterator::QSetIterator(const QSet &set) - \fn QMutableSetIterator::QMutableSetIterator(QSet &set) + \fn template QSetIterator::QSetIterator(const QSet &set) + \fn template QMutableSetIterator::QMutableSetIterator(QSet &set) Constructs an iterator for traversing \a set. The iterator is set to be at the front of the set (before the first item). @@ -501,10 +623,10 @@ \sa operator=() */ -/*! \fn QMutableListIterator &QMutableListIterator::operator=(QList &list) - \fn QMutableLinkedListIterator &QMutableLinkedListIterator::operator=(QLinkedList &list) - \fn QListIterator &QListIterator::operator=(const QList &list) - \fn QLinkedListIterator &QLinkedListIterator::operator=(const QLinkedList &list) +/*! \fn template QMutableListIterator &QMutableListIterator::operator=(QList &list) + \fn template QMutableLinkedListIterator &QMutableLinkedListIterator::operator=(QLinkedList &list) + \fn template QListIterator &QListIterator::operator=(const QList &list) + \fn template QLinkedListIterator &QLinkedListIterator::operator=(const QLinkedList &list) Makes the iterator operate on \a list. The iterator is set to be at the front of the list (before the first item). @@ -512,8 +634,8 @@ \sa toFront(), toBack() */ -/*! \fn QVectorIterator &QVectorIterator::operator=(const QVector &vector) - \fn QMutableVectorIterator &QMutableVectorIterator::operator=(QVector &vector) +/*! \fn template QVectorIterator &QVectorIterator::operator=(const QVector &vector) + \fn template QMutableVectorIterator &QMutableVectorIterator::operator=(QVector &vector) Makes the iterator operate on \a vector. The iterator is set to be at the front of the vector (before the first item). @@ -521,8 +643,8 @@ \sa toFront(), toBack() */ -/*! \fn QSetIterator &QSetIterator::operator=(const QSet &set) - \fn QMutableSetIterator &QMutableSetIterator::operator=(QSet &set) +/*! \fn template QSetIterator &QSetIterator::operator=(const QSet &set) + \fn template QMutableSetIterator &QMutableSetIterator::operator=(QSet &set) Makes the iterator operate on \a set. The iterator is set to be at the front of the set (before the first item). @@ -530,14 +652,14 @@ \sa toFront(), toBack() */ -/*! \fn void QListIterator::toFront() - \fn void QLinkedListIterator::toFront() - \fn void QVectorIterator::toFront() - \fn void QSetIterator::toFront() - \fn void QMutableListIterator::toFront() - \fn void QMutableLinkedListIterator::toFront() - \fn void QMutableVectorIterator::toFront() - \fn void QMutableSetIterator::toFront() +/*! \fn template void QListIterator::toFront() + \fn template void QLinkedListIterator::toFront() + \fn template void QVectorIterator::toFront() + \fn template void QSetIterator::toFront() + \fn template void QMutableListIterator::toFront() + \fn template void QMutableLinkedListIterator::toFront() + \fn template void QMutableVectorIterator::toFront() + \fn template void QMutableSetIterator::toFront() Moves the iterator to the front of the container (before the first item). @@ -545,14 +667,14 @@ \sa toBack(), next() */ -/*! \fn void QListIterator::toBack() - \fn void QLinkedListIterator::toBack() - \fn void QVectorIterator::toBack() - \fn void QSetIterator::toBack() - \fn void QMutableListIterator::toBack() - \fn void QMutableLinkedListIterator::toBack() - \fn void QMutableVectorIterator::toBack() - \fn void QMutableSetIterator::toBack() +/*! \fn template void QListIterator::toBack() + \fn template void QLinkedListIterator::toBack() + \fn template void QVectorIterator::toBack() + \fn template void QSetIterator::toBack() + \fn template void QMutableListIterator::toBack() + \fn template void QMutableLinkedListIterator::toBack() + \fn template void QMutableVectorIterator::toBack() + \fn template void QMutableSetIterator::toBack() Moves the iterator to the back of the container (after the last item). @@ -560,14 +682,14 @@ \sa toFront(), previous() */ -/*! \fn bool QListIterator::hasNext() const - \fn bool QLinkedListIterator::hasNext() const - \fn bool QVectorIterator::hasNext() const - \fn bool QSetIterator::hasNext() const - \fn bool QMutableListIterator::hasNext() const - \fn bool QMutableLinkedListIterator::hasNext() const - \fn bool QMutableVectorIterator::hasNext() const - \fn bool QMutableSetIterator::hasNext() const +/*! \fn template bool QListIterator::hasNext() const + \fn template bool QLinkedListIterator::hasNext() const + \fn template bool QVectorIterator::hasNext() const + \fn template bool QSetIterator::hasNext() const + \fn template bool QMutableListIterator::hasNext() const + \fn template bool QMutableLinkedListIterator::hasNext() const + \fn template bool QMutableVectorIterator::hasNext() const + \fn template bool QMutableSetIterator::hasNext() const Returns \c true if there is at least one item ahead of the iterator, i.e. the iterator is \e not at the back of the container; @@ -576,11 +698,11 @@ \sa hasPrevious(), next() */ -/*! \fn const T &QListIterator::next() - \fn const T &QLinkedListIterator::next() - \fn const T &QVectorIterator::next() - \fn const T &QSetIterator::next() - \fn const T &QMutableSetIterator::next() +/*! \fn template const T &QListIterator::next() + \fn template const T &QLinkedListIterator::next() + \fn template const T &QVectorIterator::next() + \fn template const T &QSetIterator::next() + \fn template const T &QMutableSetIterator::next() Returns the next item and advances the iterator by one position. @@ -590,9 +712,9 @@ \sa hasNext(), peekNext(), previous() */ -/*! \fn T &QMutableListIterator::next() - \fn T &QMutableLinkedListIterator::next() - \fn T &QMutableVectorIterator::next() +/*! \fn template T &QMutableListIterator::next() + \fn template T &QMutableLinkedListIterator::next() + \fn template T &QMutableVectorIterator::next() Returns a reference to the next item, and advances the iterator by one position. @@ -603,11 +725,11 @@ \sa hasNext(), peekNext(), previous() */ -/*! \fn const T &QListIterator::peekNext() const - \fn const T &QLinkedListIterator::peekNext() const - \fn const T &QVectorIterator::peekNext() const - \fn const T &QSetIterator::peekNext() const - \fn const T &QMutableSetIterator::peekNext() const +/*! \fn template const T &QListIterator::peekNext() const + \fn template const T &QLinkedListIterator::peekNext() const + \fn template const T &QVectorIterator::peekNext() const + \fn template const T &QSetIterator::peekNext() const + \fn template const T &QMutableSetIterator::peekNext() const Returns the next item without moving the iterator. @@ -617,9 +739,9 @@ \sa hasNext(), next(), peekPrevious() */ -/*! \fn T &QMutableListIterator::peekNext() const - \fn T &QMutableLinkedListIterator::peekNext() const - \fn T &QMutableVectorIterator::peekNext() const +/*! \fn template T &QMutableListIterator::peekNext() const + \fn template T &QMutableLinkedListIterator::peekNext() const + \fn template T &QMutableVectorIterator::peekNext() const Returns a reference to the next item, without moving the iterator. @@ -629,14 +751,14 @@ \sa hasNext(), next(), peekPrevious() */ -/*! \fn bool QListIterator::hasPrevious() const - \fn bool QLinkedListIterator::hasPrevious() const - \fn bool QVectorIterator::hasPrevious() const - \fn bool QSetIterator::hasPrevious() const - \fn bool QMutableListIterator::hasPrevious() const - \fn bool QMutableLinkedListIterator::hasPrevious() const - \fn bool QMutableVectorIterator::hasPrevious() const - \fn bool QMutableSetIterator::hasPrevious() const +/*! \fn template bool QListIterator::hasPrevious() const + \fn template bool QLinkedListIterator::hasPrevious() const + \fn template bool QVectorIterator::hasPrevious() const + \fn template bool QSetIterator::hasPrevious() const + \fn template bool QMutableListIterator::hasPrevious() const + \fn template bool QMutableLinkedListIterator::hasPrevious() const + \fn template bool QMutableVectorIterator::hasPrevious() const + \fn template bool QMutableSetIterator::hasPrevious() const Returns \c true if there is at least one item behind the iterator, i.e. the iterator is \e not at the front of the container; @@ -645,11 +767,11 @@ \sa hasNext(), previous() */ -/*! \fn const T &QListIterator::previous() - \fn const T &QLinkedListIterator::previous() - \fn const T &QVectorIterator::previous() - \fn const T &QSetIterator::previous() - \fn const T &QMutableSetIterator::previous() +/*! \fn template const T &QListIterator::previous() + \fn template const T &QLinkedListIterator::previous() + \fn template const T &QVectorIterator::previous() + \fn template const T &QSetIterator::previous() + \fn template const T &QMutableSetIterator::previous() Returns the previous item and moves the iterator back by one position. @@ -660,9 +782,9 @@ \sa hasPrevious(), peekPrevious(), next() */ -/*! \fn T &QMutableListIterator::previous() - \fn T &QMutableLinkedListIterator::previous() - \fn T &QMutableVectorIterator::previous() +/*! \fn template T &QMutableListIterator::previous() + \fn template T &QMutableLinkedListIterator::previous() + \fn template T &QMutableVectorIterator::previous() Returns a reference to the previous item and moves the iterator back by one position. @@ -673,11 +795,11 @@ \sa hasPrevious(), peekPrevious(), next() */ -/*! \fn const T &QListIterator::peekPrevious() const - \fn const T &QLinkedListIterator::peekPrevious() const - \fn const T &QVectorIterator::peekPrevious() const - \fn const T &QSetIterator::peekPrevious() const - \fn const T &QMutableSetIterator::peekPrevious() const +/*! \fn template const T &QListIterator::peekPrevious() const + \fn template const T &QLinkedListIterator::peekPrevious() const + \fn template const T &QVectorIterator::peekPrevious() const + \fn template const T &QSetIterator::peekPrevious() const + \fn template const T &QMutableSetIterator::peekPrevious() const Returns the previous item without moving the iterator. @@ -687,9 +809,9 @@ \sa hasPrevious(), previous(), peekNext() */ -/*! \fn T &QMutableListIterator::peekPrevious() const - \fn T &QMutableLinkedListIterator::peekPrevious() const - \fn T &QMutableVectorIterator::peekPrevious() const +/*! \fn template T &QMutableListIterator::peekPrevious() const + \fn template T &QMutableLinkedListIterator::peekPrevious() const + \fn template T &QMutableVectorIterator::peekPrevious() const Returns a reference to the previous item, without moving the iterator. @@ -699,14 +821,14 @@ \sa hasPrevious(), previous(), peekNext() */ -/*! \fn bool QListIterator::findNext(const T &value) - \fn bool QLinkedListIterator::findNext(const T &value) - \fn bool QVectorIterator::findNext(const T &value) - \fn bool QSetIterator::findNext(const T &value) - \fn bool QMutableListIterator::findNext(const T &value) - \fn bool QMutableLinkedListIterator::findNext(const T &value) - \fn bool QMutableVectorIterator::findNext(const T &value) - \fn bool QMutableSetIterator::findNext(const T &value) +/*! \fn template bool QListIterator::findNext(const T &value) + \fn template bool QLinkedListIterator::findNext(const T &value) + \fn template bool QVectorIterator::findNext(const T &value) + \fn template bool QSetIterator::findNext(const T &value) + \fn template bool QMutableListIterator::findNext(const T &value) + \fn template bool QMutableLinkedListIterator::findNext(const T &value) + \fn template bool QMutableVectorIterator::findNext(const T &value) + \fn template bool QMutableSetIterator::findNext(const T &value) Searches for \a value starting from the current iterator position forward. Returns \c true if \a value is found; otherwise returns \c false. @@ -718,14 +840,14 @@ \sa findPrevious() */ -/*! \fn bool QListIterator::findPrevious(const T &value) - \fn bool QLinkedListIterator::findPrevious(const T &value) - \fn bool QVectorIterator::findPrevious(const T &value) - \fn bool QSetIterator::findPrevious(const T &value) - \fn bool QMutableListIterator::findPrevious(const T &value) - \fn bool QMutableLinkedListIterator::findPrevious(const T &value) - \fn bool QMutableVectorIterator::findPrevious(const T &value) - \fn bool QMutableSetIterator::findPrevious(const T &value) +/*! \fn template bool QListIterator::findPrevious(const T &value) + \fn template bool QLinkedListIterator::findPrevious(const T &value) + \fn template bool QVectorIterator::findPrevious(const T &value) + \fn template bool QSetIterator::findPrevious(const T &value) + \fn template bool QMutableListIterator::findPrevious(const T &value) + \fn template bool QMutableLinkedListIterator::findPrevious(const T &value) + \fn template bool QMutableVectorIterator::findPrevious(const T &value) + \fn template bool QMutableSetIterator::findPrevious(const T &value) Searches for \a value starting from the current iterator position backward. Returns \c true if \a value is found; otherwise returns @@ -738,7 +860,7 @@ \sa findNext() */ -/*! \fn void QMutableListIterator::remove() +/*! \fn template void QMutableListIterator::remove() Removes the last item that was jumped over using one of the traversal functions (next(), previous(), findNext(), findPrevious()). @@ -749,7 +871,7 @@ \sa insert(), setValue() */ -/*! \fn void QMutableLinkedListIterator::remove() +/*! \fn template void QMutableLinkedListIterator::remove() Removes the last item that was jumped over using one of the traversal functions (next(), previous(), findNext(), findPrevious()). @@ -760,7 +882,7 @@ \sa insert(), setValue() */ -/*! \fn void QMutableVectorIterator::remove() +/*! \fn template void QMutableVectorIterator::remove() Removes the last item that was jumped over using one of the traversal functions (next(), previous(), findNext(), findPrevious()). @@ -771,7 +893,7 @@ \sa insert(), setValue() */ -/*! \fn void QMutableSetIterator::remove() +/*! \fn template void QMutableSetIterator::remove() Removes the last item that was jumped over using one of the traversal functions (next(), previous(), findNext(), findPrevious()). @@ -782,7 +904,7 @@ \sa value() */ -/*! \fn void QMutableListIterator::setValue(const T &value) const +/*! \fn template void QMutableListIterator::setValue(const T &value) const Replaces the value of the last item that was jumped over using one of the traversal functions with \a value. @@ -796,7 +918,7 @@ \sa value(), remove(), insert() */ -/*! \fn void QMutableLinkedListIterator::setValue(const T &value) const +/*! \fn template void QMutableLinkedListIterator::setValue(const T &value) const Replaces the value of the last item that was jumped over using one of the traversal functions with \a value. @@ -810,7 +932,7 @@ \sa value(), remove(), insert() */ -/*! \fn void QMutableVectorIterator::setValue(const T &value) const +/*! \fn template void QMutableVectorIterator::setValue(const T &value) const Replaces the value of the last item that was jumped over using one of the traversal functions with \a value. @@ -824,10 +946,10 @@ \sa value(), remove(), insert() */ -/*! \fn const T &QMutableListIterator::value() const - \fn const T &QMutableLinkedListIterator::value() const - \fn const T &QMutableVectorIterator::value() const - \fn const T &QMutableSetIterator::value() const +/*! \fn template const T &QMutableListIterator::value() const + \fn template const T &QMutableLinkedListIterator::value() const + \fn template const T &QMutableVectorIterator::value() const + \fn template const T &QMutableSetIterator::value() const Returns the value of the last item that was jumped over using one of the traversal functions (next(), previous(), findNext(), @@ -839,18 +961,18 @@ */ /*! - \fn T &QMutableListIterator::value() - \fn T &QMutableLinkedListIterator::value() - \fn T &QMutableVectorIterator::value() + \fn template T &QMutableListIterator::value() + \fn template T &QMutableLinkedListIterator::value() + \fn template T &QMutableVectorIterator::value() \overload Returns a non-const reference to the value of the last item that was jumped over using one of the traversal functions. */ -/*! \fn void QMutableListIterator::insert(const T &value) - \fn void QMutableLinkedListIterator::insert(const T &value) - \fn void QMutableVectorIterator::insert(const T &value) +/*! \fn template void QMutableListIterator::insert(const T &value) + \fn template void QMutableLinkedListIterator::insert(const T &value) + \fn template void QMutableVectorIterator::insert(const T &value) Inserts \a value at the current iterator position. After the call, the iterator is located just after the inserted item. @@ -1092,8 +1214,8 @@ \sa QHashIterator, QHash::iterator */ -/*! \fn QMapIterator::QMapIterator(const QMap &map) - \fn QMutableMapIterator::QMutableMapIterator(QMap &map) +/*! \fn template QMapIterator::QMapIterator(const QMap &map) + \fn template QMutableMapIterator::QMutableMapIterator(QMap &map) Constructs an iterator for traversing \a map. The iterator is set to be at the front of the map (before the first item). @@ -1101,8 +1223,8 @@ \sa operator=() */ -/*! \fn QHashIterator::QHashIterator(const QHash &hash) - \fn QMutableHashIterator::QMutableHashIterator(QHash &hash) +/*! \fn template QHashIterator::QHashIterator(const QHash &hash) + \fn template QMutableHashIterator::QMutableHashIterator(QHash &hash) Constructs an iterator for traversing \a hash. The iterator is set to be at the front of the hash (before the first item). @@ -1110,8 +1232,8 @@ \sa operator=() */ -/*! \fn QMapIterator &QMapIterator::operator=(const QMap &map) - \fn QMutableMapIterator &QMutableMapIterator::operator=(QMap &map) +/*! \fn template QMapIterator &QMapIterator::operator=(const QMap &map) + \fn template QMutableMapIterator &QMutableMapIterator::operator=(QMap &map) Makes the iterator operate on \a map. The iterator is set to be at the front of the map (before the first item). @@ -1119,8 +1241,8 @@ \sa toFront(), toBack() */ -/*! \fn QHashIterator &QHashIterator::operator=(const QHash &hash) - \fn QMutableHashIterator &QMutableHashIterator::operator=(QHash &hash) +/*! \fn template QHashIterator &QHashIterator::operator=(const QHash &hash) + \fn template QMutableHashIterator &QMutableHashIterator::operator=(QHash &hash) Makes the iterator operate on \a hash. The iterator is set to be at the front of the hash (before the first item). @@ -1128,10 +1250,10 @@ \sa toFront(), toBack() */ -/*! \fn void QMapIterator::toFront() - \fn void QHashIterator::toFront() - \fn void QMutableMapIterator::toFront() - \fn void QMutableHashIterator::toFront() +/*! \fn template void QMapIterator::toFront() + \fn template void QHashIterator::toFront() + \fn template void QMutableMapIterator::toFront() + \fn template void QMutableHashIterator::toFront() Moves the iterator to the front of the container (before the first item). @@ -1139,10 +1261,10 @@ \sa toBack(), next() */ -/*! \fn void QMapIterator::toBack() - \fn void QHashIterator::toBack() - \fn void QMutableMapIterator::toBack() - \fn void QMutableHashIterator::toBack() +/*! \fn template void QMapIterator::toBack() + \fn template void QHashIterator::toBack() + \fn template void QMutableMapIterator::toBack() + \fn template void QMutableHashIterator::toBack() Moves the iterator to the back of the container (after the last item). @@ -1150,10 +1272,10 @@ \sa toFront(), previous() */ -/*! \fn bool QMapIterator::hasNext() const - \fn bool QHashIterator::hasNext() const - \fn bool QMutableMapIterator::hasNext() const - \fn bool QMutableHashIterator::hasNext() const +/*! \fn template bool QMapIterator::hasNext() const + \fn template bool QHashIterator::hasNext() const + \fn template bool QMutableMapIterator::hasNext() const + \fn template bool QMutableHashIterator::hasNext() const Returns \c true if there is at least one item ahead of the iterator, i.e. the iterator is \e not at the back of the container; @@ -1162,8 +1284,8 @@ \sa hasPrevious(), next() */ -/*! \fn QMapIterator::Item QMapIterator::next() - \fn QHashIterator::Item QHashIterator::next() +/*! \fn template QMapIterator::Item QMapIterator::next() + \fn template QHashIterator::Item QHashIterator::next() Returns the next item and advances the iterator by one position. @@ -1176,8 +1298,8 @@ \sa hasNext(), peekNext(), previous() */ -/*! \fn QMutableMapIterator::Item QMutableMapIterator::next() - \fn QMutableHashIterator::Item QMutableHashIterator::next() +/*! \fn template QMutableMapIterator::Item QMutableMapIterator::next() + \fn template QMutableHashIterator::Item QMutableHashIterator::next() Returns the next item and advances the iterator by one position. @@ -1190,8 +1312,8 @@ \sa hasNext(), peekNext(), previous() */ -/*! \fn QMapIterator::Item QMapIterator::peekNext() const - \fn QHashIterator::Item QHashIterator::peekNext() const +/*! \fn template QMapIterator::Item QMapIterator::peekNext() const + \fn template QHashIterator::Item QHashIterator::peekNext() const Returns the next item without moving the iterator. @@ -1204,8 +1326,8 @@ \sa hasNext(), next(), peekPrevious() */ -/*! \fn QMutableMapIterator::Item QMutableMapIterator::peekNext() const - \fn QMutableHashIterator::Item QMutableHashIterator::peekNext() const +/*! \fn template QMutableMapIterator::Item QMutableMapIterator::peekNext() const + \fn template QMutableHashIterator::Item QMutableHashIterator::peekNext() const Returns a reference to the next item without moving the iterator. @@ -1218,10 +1340,10 @@ \sa hasNext(), next(), peekPrevious() */ -/*! \fn bool QMapIterator::hasPrevious() const - \fn bool QHashIterator::hasPrevious() const - \fn bool QMutableMapIterator::hasPrevious() const - \fn bool QMutableHashIterator::hasPrevious() const +/*! \fn template bool QMapIterator::hasPrevious() const + \fn template bool QHashIterator::hasPrevious() const + \fn template bool QMutableMapIterator::hasPrevious() const + \fn template bool QMutableHashIterator::hasPrevious() const Returns \c true if there is at least one item behind the iterator, i.e. the iterator is \e not at the front of the container; @@ -1230,8 +1352,8 @@ \sa hasNext(), previous() */ -/*! \fn QMapIterator::Item QMapIterator::previous() - \fn QHashIterator::Item QHashIterator::previous() +/*! \fn template QMapIterator::Item QMapIterator::previous() + \fn template QHashIterator::Item QHashIterator::previous() Returns the previous item and moves the iterator back by one position. @@ -1245,8 +1367,8 @@ \sa hasPrevious(), peekPrevious(), next() */ -/*! \fn QMutableMapIterator::Item QMutableMapIterator::previous() - \fn QMutableHashIterator::Item QMutableHashIterator::previous() +/*! \fn template QMutableMapIterator::Item QMutableMapIterator::previous() + \fn template QMutableHashIterator::Item QMutableHashIterator::previous() Returns the previous item and moves the iterator back by one position. @@ -1260,8 +1382,8 @@ \sa hasPrevious(), peekPrevious(), next() */ -/*! \fn QMapIterator::Item QMapIterator::peekPrevious() const - \fn QHashIterator::Item QHashIterator::peekPrevious() const +/*! \fn template QMapIterator::Item QMapIterator::peekPrevious() const + \fn template QHashIterator::Item QHashIterator::peekPrevious() const Returns the previous item without moving the iterator. @@ -1274,8 +1396,8 @@ \sa hasPrevious(), previous(), peekNext() */ -/*! \fn QMutableMapIterator::Item QMutableMapIterator::peekPrevious() const - \fn QMutableHashIterator::Item QMutableHashIterator::peekPrevious() const +/*! \fn template QMutableMapIterator::Item QMutableMapIterator::peekPrevious() const + \fn template QMutableHashIterator::Item QMutableHashIterator::peekPrevious() const Returns the previous item without moving the iterator. @@ -1288,8 +1410,8 @@ \sa hasPrevious(), previous(), peekNext() */ -/*! \fn const T &QMapIterator::value() const - \fn const T &QHashIterator::value() const +/*! \fn template const T &QMapIterator::value() const + \fn template const T &QHashIterator::value() const Returns the value of the last item that was jumped over using one of the traversal functions (next(), previous(), findNext(), @@ -1303,8 +1425,8 @@ */ /*! - \fn const T &QMutableMapIterator::value() const - \fn const T &QMutableHashIterator::value() const + \fn template const T &QMutableMapIterator::value() const + \fn template const T &QMutableHashIterator::value() const Returns the value of the last item that was jumped over using one of the traversal functions (next(), previous(), findNext(), @@ -1318,8 +1440,8 @@ */ /*! - \fn T &QMutableMapIterator::value() - \fn T &QMutableHashIterator::value() + \fn template T &QMutableMapIterator::value() + \fn template T &QMutableHashIterator::value() \overload Returns a non-const reference to the value of @@ -1327,10 +1449,10 @@ of the traversal functions. */ -/*! \fn const Key &QMapIterator::key() const - \fn const Key &QHashIterator::key() const - \fn const Key &QMutableMapIterator::key() const - \fn const Key &QMutableHashIterator::key() const +/*! \fn template const Key &QMapIterator::key() const + \fn template const Key &QHashIterator::key() const + \fn template const Key &QMutableMapIterator::key() const + \fn template const Key &QMutableHashIterator::key() const Returns the key of the last item that was jumped over using one of the traversal functions (next(), previous(), findNext(), @@ -1343,10 +1465,10 @@ \sa value() */ -/*! \fn bool QMapIterator::findNext(const T &value) - \fn bool QHashIterator::findNext(const T &value) - \fn bool QMutableMapIterator::findNext(const T &value) - \fn bool QMutableHashIterator::findNext(const T &value) +/*! \fn template bool QMapIterator::findNext(const T &value) + \fn template bool QHashIterator::findNext(const T &value) + \fn template bool QMutableMapIterator::findNext(const T &value) + \fn template bool QMutableHashIterator::findNext(const T &value) Searches for \a value starting from the current iterator position forward. Returns \c true if a (key, value) pair with value \a value @@ -1359,10 +1481,10 @@ \sa findPrevious() */ -/*! \fn bool QMapIterator::findPrevious(const T &value) - \fn bool QHashIterator::findPrevious(const T &value) - \fn bool QMutableMapIterator::findPrevious(const T &value) - \fn bool QMutableHashIterator::findPrevious(const T &value) +/*! \fn template bool QMapIterator::findPrevious(const T &value) + \fn template bool QHashIterator::findPrevious(const T &value) + \fn template bool QMutableMapIterator::findPrevious(const T &value) + \fn template bool QMutableHashIterator::findPrevious(const T &value) Searches for \a value starting from the current iterator position backward. Returns \c true if a (key, value) pair with value \a value @@ -1375,8 +1497,8 @@ \sa findNext() */ -/*! \fn void QMutableMapIterator::remove() - \fn void QMutableHashIterator::remove() +/*! \fn template void QMutableMapIterator::remove() + \fn template void QMutableHashIterator::remove() Removes the last item that was jumped over using one of the traversal functions (next(), previous(), findNext(), findPrevious()). @@ -1384,8 +1506,8 @@ \sa setValue() */ -/*! \fn void QMutableMapIterator::setValue(const T &value) - \fn void QMutableHashIterator::setValue(const T &value) +/*! \fn template void QMutableMapIterator::setValue(const T &value) + \fn template void QMutableHashIterator::setValue(const T &value) Replaces the value of the last item that was jumped over using one of the traversal functions with \a value. diff --git a/src/corelib/tools/qlinkedlist.cpp b/src/corelib/tools/qlinkedlist.cpp index 642d2a28a0..d9d93862e5 100644 --- a/src/corelib/tools/qlinkedlist.cpp +++ b/src/corelib/tools/qlinkedlist.cpp @@ -118,13 +118,13 @@ const QLinkedListData QLinkedListData::shared_null = { \sa QLinkedListIterator, QMutableLinkedListIterator, QList, QVector */ -/*! \fn QLinkedList::QLinkedList() +/*! \fn template QLinkedList::QLinkedList() Constructs an empty list. */ /*! - \fn QLinkedList::QLinkedList(QLinkedList &&other) + \fn template QLinkedList::QLinkedList(QLinkedList &&other) Move-constructs a QLinkedList instance, making it point at the same object that \a other was pointing to. @@ -132,7 +132,7 @@ const QLinkedListData QLinkedListData::shared_null = { \since 5.2 */ -/*! \fn QLinkedList::QLinkedList(const QLinkedList &other) +/*! \fn template QLinkedList::QLinkedList(const QLinkedList &other) Constructs a copy of \a other. @@ -144,7 +144,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator=() */ -/*! \fn QLinkedList::QLinkedList(std::initializer_list list) +/*! \fn template QLinkedList::QLinkedList(std::initializer_list list) \since 5.2 Constructs a list from the std::initializer_list specified by \a list. @@ -153,26 +153,26 @@ const QLinkedListData QLinkedListData::shared_null = { initializer lists. */ -/*! \fn QLinkedList::~QLinkedList() +/*! \fn template QLinkedList::~QLinkedList() Destroys the list. References to the values in the list, and all iterators over this list, become invalid. */ -/*! \fn QLinkedList &QLinkedList::operator=(const QLinkedList &other) +/*! \fn template QLinkedList &QLinkedList::operator=(const QLinkedList &other) Assigns \a other to this list and returns a reference to this list. */ -/*! \fn void QLinkedList::swap(QLinkedList &other) +/*! \fn template void QLinkedList::swap(QLinkedList &other) \since 4.8 Swaps list \a other with this list. This operation is very fast and never fails. */ -/*! \fn bool QLinkedList::operator==(const QLinkedList &other) const +/*! \fn template bool QLinkedList::operator==(const QLinkedList &other) const Returns \c true if \a other is equal to this list; otherwise returns false. @@ -186,7 +186,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator!=() */ -/*! \fn bool QLinkedList::operator!=(const QLinkedList &other) const +/*! \fn template bool QLinkedList::operator!=(const QLinkedList &other) const Returns \c true if \a other is not equal to this list; otherwise returns \c false. @@ -200,34 +200,34 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator==() */ -/*! \fn int QLinkedList::size() const +/*! \fn template int QLinkedList::size() const Returns the number of items in the list. \sa isEmpty(), count() */ -/*! \fn void QLinkedList::detach() +/*! \fn template void QLinkedList::detach() \internal */ -/*! \fn bool QLinkedList::isDetached() const +/*! \fn template bool QLinkedList::isDetached() const \internal */ -/*! \fn void QLinkedList::setSharable(bool sharable) +/*! \fn template void QLinkedList::setSharable(bool sharable) \internal */ -/*! \fn bool QLinkedList::isSharedWith(const QLinkedList &other) const +/*! \fn template bool QLinkedList::isSharedWith(const QLinkedList &other) const \internal */ -/*! \fn bool QLinkedList::isEmpty() const +/*! \fn template bool QLinkedList::isEmpty() const Returns \c true if the list contains no items; otherwise returns false. @@ -235,14 +235,14 @@ const QLinkedListData QLinkedListData::shared_null = { \sa size() */ -/*! \fn void QLinkedList::clear() +/*! \fn template void QLinkedList::clear() Removes all the items in the list. \sa removeAll() */ -/*! \fn void QLinkedList::append(const T &value) +/*! \fn template void QLinkedList::append(const T &value) Inserts \a value at the end of the list. @@ -254,7 +254,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator<<(), prepend(), insert() */ -/*! \fn void QLinkedList::prepend(const T &value) +/*! \fn template void QLinkedList::prepend(const T &value) Inserts \a value at the beginning of the list. @@ -266,7 +266,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa append(), insert() */ -/*! \fn int QLinkedList::removeAll(const T &value) +/*! \fn template int QLinkedList::removeAll(const T &value) Removes all occurrences of \a value in the list. @@ -280,7 +280,7 @@ const QLinkedListData QLinkedListData::shared_null = { */ /*! - \fn bool QLinkedList::removeOne(const T &value) + \fn template bool QLinkedList::removeOne(const T &value) \since 4.4 Removes the first occurrences of \a value in the list. Returns \c true on @@ -295,7 +295,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa insert() */ -/*! \fn bool QLinkedList::contains(const T &value) const +/*! \fn template bool QLinkedList::contains(const T &value) const Returns \c true if the list contains an occurrence of \a value; otherwise returns \c false. @@ -306,7 +306,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa QLinkedListIterator::findNext(), QLinkedListIterator::findPrevious() */ -/*! \fn int QLinkedList::count(const T &value) const +/*! \fn template int QLinkedList::count(const T &value) const Returns the number of occurrences of \a value in the list. @@ -316,7 +316,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa contains() */ -/*! \fn bool QLinkedList::startsWith(const T &value) const +/*! \fn template bool QLinkedList::startsWith(const T &value) const \since 4.5 Returns \c true if the list is not empty and its first @@ -325,7 +325,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa isEmpty(), first() */ -/*! \fn bool QLinkedList::endsWith(const T &value) const +/*! \fn template bool QLinkedList::endsWith(const T &value) const \since 4.5 Returns \c true if the list is not empty and its last @@ -334,7 +334,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa isEmpty(), last() */ -/*! \fn QLinkedList::iterator QLinkedList::begin() +/*! \fn template QLinkedList::iterator QLinkedList::begin() Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the list. @@ -342,12 +342,12 @@ const QLinkedListData QLinkedListData::shared_null = { \sa constBegin(), end() */ -/*! \fn QLinkedList::const_iterator QLinkedList::begin() const +/*! \fn template QLinkedList::const_iterator QLinkedList::begin() const \overload */ -/*! \fn QLinkedList::const_iterator QLinkedList::cbegin() const +/*! \fn template QLinkedList::const_iterator QLinkedList::cbegin() const \since 5.0 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item @@ -356,7 +356,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa begin(), cend() */ -/*! \fn QLinkedList::const_iterator QLinkedList::constBegin() const +/*! \fn template QLinkedList::const_iterator QLinkedList::constBegin() const Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the list. @@ -364,7 +364,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa begin(), constEnd() */ -/*! \fn QLinkedList::iterator QLinkedList::end() +/*! \fn template QLinkedList::iterator QLinkedList::end() Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the list. @@ -372,12 +372,12 @@ const QLinkedListData QLinkedListData::shared_null = { \sa begin(), constEnd() */ -/*! \fn QLinkedList::const_iterator QLinkedList::end() const +/*! \fn template QLinkedList::const_iterator QLinkedList::end() const \overload */ -/*! \fn QLinkedList::const_iterator QLinkedList::cend() const +/*! \fn template QLinkedList::const_iterator QLinkedList::cend() const \since 5.0 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary @@ -386,7 +386,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa cbegin(), end() */ -/*! \fn QLinkedList::const_iterator QLinkedList::constEnd() const +/*! \fn template QLinkedList::const_iterator QLinkedList::constEnd() const Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the list. @@ -394,7 +394,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa constBegin(), end() */ -/*! \fn QLinkedList::reverse_iterator QLinkedList::rbegin() +/*! \fn template QLinkedList::reverse_iterator QLinkedList::rbegin() \since 5.6 Returns a \l{STL-style iterators}{STL-style} reverse iterator pointing to the first @@ -403,12 +403,12 @@ const QLinkedListData QLinkedListData::shared_null = { \sa begin(), crbegin(), rend() */ -/*! \fn QLinkedList::const_reverse_iterator QLinkedList::rbegin() const +/*! \fn template QLinkedList::const_reverse_iterator QLinkedList::rbegin() const \since 5.6 \overload */ -/*! \fn QLinkedList::const_reverse_iterator QLinkedList::crbegin() const +/*! \fn template QLinkedList::const_reverse_iterator QLinkedList::crbegin() const \since 5.6 Returns a const \l{STL-style iterators}{STL-style} reverse iterator pointing to the first @@ -417,7 +417,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa begin(), rbegin(), rend() */ -/*! \fn QLinkedList::reverse_iterator QLinkedList::rend() +/*! \fn template QLinkedList::reverse_iterator QLinkedList::rend() \since 5.6 Returns a \l{STL-style iterators}{STL-style} reverse iterator pointing to one past @@ -426,12 +426,12 @@ const QLinkedListData QLinkedListData::shared_null = { \sa end(), crend(), rbegin() */ -/*! \fn QLinkedList::const_reverse_iterator QLinkedList::rend() const +/*! \fn template QLinkedList::const_reverse_iterator QLinkedList::rend() const \since 5.6 \overload */ -/*! \fn QLinkedList::const_reverse_iterator QLinkedList::crend() const +/*! \fn template QLinkedList::const_reverse_iterator QLinkedList::crend() const \since 5.6 Returns a const \l{STL-style iterators}{STL-style} reverse iterator pointing to one @@ -440,7 +440,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa end(), rend(), rbegin() */ -/*! \fn QLinkedList::iterator QLinkedList::insert(iterator before, const T &value) +/*! \fn template QLinkedList::iterator QLinkedList::insert(iterator before, const T &value) Inserts \a value in front of the item pointed to by the iterator \a before. Returns an iterator pointing at the inserted item. @@ -448,7 +448,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa erase() */ -/*! \fn QLinkedList::iterator QLinkedList::erase(iterator pos) +/*! \fn template QLinkedList::iterator QLinkedList::erase(iterator pos) Removes the item pointed to by the iterator \a pos from the list, and returns an iterator to the next item in the list (which may be @@ -457,7 +457,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa insert() */ -/*! \fn QLinkedList::iterator QLinkedList::erase(iterator begin, iterator end) +/*! \fn template QLinkedList::iterator QLinkedList::erase(iterator begin, iterator end) \overload @@ -549,12 +549,12 @@ const QLinkedListData QLinkedListData::shared_null = { Typedef for ptrdiff_t. Provided for STL compatibility. */ -/*! \fn int QLinkedList::count() const +/*! \fn template int QLinkedList::count() const Same as size(). */ -/*! \fn T& QLinkedList::first() +/*! \fn template T& QLinkedList::first() Returns a reference to the first item in the list. This function assumes that the list isn't empty. @@ -562,12 +562,12 @@ const QLinkedListData QLinkedListData::shared_null = { \sa last(), isEmpty() */ -/*! \fn const T& QLinkedList::first() const +/*! \fn template const T& QLinkedList::first() const \overload */ -/*! \fn T& QLinkedList::last() +/*! \fn template T& QLinkedList::last() Returns a reference to the last item in the list. This function assumes that the list isn't empty. @@ -575,12 +575,12 @@ const QLinkedListData QLinkedListData::shared_null = { \sa first(), isEmpty() */ -/*! \fn const T& QLinkedList::last() const +/*! \fn template const T& QLinkedList::last() const \overload */ -/*! \fn void QLinkedList::removeFirst() +/*! \fn template void QLinkedList::removeFirst() Removes the first item in the list. @@ -589,14 +589,14 @@ const QLinkedListData QLinkedListData::shared_null = { \sa removeLast(), erase() */ -/*! \fn void QLinkedList::removeLast() +/*! \fn template void QLinkedList::removeLast() Removes the last item in the list. \sa removeFirst(), erase() */ -/*! \fn T QLinkedList::takeFirst() +/*! \fn template T QLinkedList::takeFirst() Removes the first item in the list and returns it. @@ -606,7 +606,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa takeLast(), removeFirst() */ -/*! \fn T QLinkedList::takeLast() +/*! \fn template T QLinkedList::takeLast() Removes the last item in the list and returns it. @@ -616,59 +616,59 @@ const QLinkedListData QLinkedListData::shared_null = { \sa takeFirst(), removeLast() */ -/*! \fn void QLinkedList::push_back(const T &value) +/*! \fn template void QLinkedList::push_back(const T &value) This function is provided for STL compatibility. It is equivalent to append(\a value). */ -/*! \fn void QLinkedList::push_front(const T &value) +/*! \fn template void QLinkedList::push_front(const T &value) This function is provided for STL compatibility. It is equivalent to prepend(\a value). */ -/*! \fn T& QLinkedList::front() +/*! \fn template T& QLinkedList::front() This function is provided for STL compatibility. It is equivalent to first(). */ -/*! \fn const T& QLinkedList::front() const +/*! \fn template const T& QLinkedList::front() const \overload */ -/*! \fn T& QLinkedList::back() +/*! \fn template T& QLinkedList::back() This function is provided for STL compatibility. It is equivalent to last(). */ -/*! \fn const T& QLinkedList::back() const +/*! \fn template const T& QLinkedList::back() const \overload */ -/*! \fn void QLinkedList::pop_front() +/*! \fn template void QLinkedList::pop_front() This function is provided for STL compatibility. It is equivalent to removeFirst(). */ -/*! \fn void QLinkedList::pop_back() +/*! \fn template void QLinkedList::pop_back() This function is provided for STL compatibility. It is equivalent to removeLast(). */ -/*! \fn bool QLinkedList::empty() const +/*! \fn template bool QLinkedList::empty() const This function is provided for STL compatibility. It is equivalent to isEmpty() and returns \c true if the list is empty. */ -/*! \fn QLinkedList &QLinkedList::operator+=(const QLinkedList &other) +/*! \fn template QLinkedList &QLinkedList::operator+=(const QLinkedList &other) Appends the items of the \a other list to this list and returns a reference to this list. @@ -676,14 +676,14 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator+(), append() */ -/*! \fn void QLinkedList::operator+=(const T &value) +/*! \fn template void QLinkedList::operator+=(const T &value) \overload Appends \a value to the list. */ -/*! \fn QLinkedList QLinkedList::operator+(const QLinkedList &other) const +/*! \fn template QLinkedList QLinkedList::operator+(const QLinkedList &other) const Returns a list that contains all the items in this list followed by all the items in the \a other list. @@ -691,7 +691,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator+=() */ -/*! \fn QLinkedList &QLinkedList::operator<<(const QLinkedList &other) +/*! \fn template QLinkedList &QLinkedList::operator<<(const QLinkedList &other) Appends the items of the \a other list to this list and returns a reference to this list. @@ -699,7 +699,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator+=(), append() */ -/*! \fn QLinkedList &QLinkedList::operator<<(const T &value) +/*! \fn template QLinkedList &QLinkedList::operator<<(const T &value) \overload @@ -777,7 +777,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa QLinkedList::const_iterator, QMutableLinkedListIterator */ -/*! \fn QLinkedList::iterator::iterator() +/*! \fn template QLinkedList::iterator::iterator() Constructs an uninitialized iterator. @@ -788,7 +788,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa QLinkedList::begin(), QLinkedList::end() */ -/*! \fn QLinkedList::iterator::iterator(Node *node) +/*! \fn template QLinkedList::iterator::iterator(Node *node) \internal */ @@ -818,25 +818,25 @@ const QLinkedListData QLinkedListData::shared_null = { \internal */ -/*! \fn QLinkedList::iterator::iterator(const iterator &other) +/*! \fn template QLinkedList::iterator::iterator(const iterator &other) Constructs a copy of \a other. */ -/*! \fn QLinkedList::iterator &QLinkedList::iterator::operator=(const iterator &other) +/*! \fn template QLinkedList::iterator &QLinkedList::iterator::operator=(const iterator &other) Assigns \a other to this iterator. */ /*! - \fn QLinkedList &QLinkedList::operator=(QLinkedList &&other) + \fn template QLinkedList &QLinkedList::operator=(QLinkedList &&other) Move-assigns \a other to this QLinkedList instance. \since 5.2 */ -/*! \fn T &QLinkedList::iterator::operator*() const +/*! \fn template T &QLinkedList::iterator::operator*() const Returns a modifiable reference to the current item. @@ -848,7 +848,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator->() */ -/*! \fn T *QLinkedList::iterator::operator->() const +/*! \fn template T *QLinkedList::iterator::operator->() const Returns a pointer to the current item. @@ -856,8 +856,8 @@ const QLinkedListData QLinkedListData::shared_null = { */ /*! - \fn bool QLinkedList::iterator::operator==(const iterator &other) const - \fn bool QLinkedList::iterator::operator==(const const_iterator &other) const + \fn template bool QLinkedList::iterator::operator==(const iterator &other) const + \fn template bool QLinkedList::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. @@ -866,8 +866,8 @@ const QLinkedListData QLinkedListData::shared_null = { */ /*! - \fn bool QLinkedList::iterator::operator!=(const iterator &other) const - \fn bool QLinkedList::iterator::operator!=(const const_iterator &other) const + \fn template bool QLinkedList::iterator::operator!=(const iterator &other) const + \fn template bool QLinkedList::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. @@ -875,7 +875,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator==() */ -/*! \fn QLinkedList::iterator &QLinkedList::iterator::operator++() +/*! \fn template QLinkedList::iterator &QLinkedList::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 @@ -887,7 +887,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator--() */ -/*! \fn QLinkedList::iterator QLinkedList::iterator::operator++(int) +/*! \fn template QLinkedList::iterator QLinkedList::iterator::operator++(int) \overload @@ -896,7 +896,7 @@ const QLinkedListData QLinkedListData::shared_null = { current item. */ -/*! \fn QLinkedList::iterator &QLinkedList::iterator::operator--() +/*! \fn template QLinkedList::iterator &QLinkedList::iterator::operator--() The prefix -- operator (\c{--it}) makes the preceding item current and returns an iterator to the new current item. @@ -907,7 +907,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator++() */ -/*! \fn QLinkedList::iterator QLinkedList::iterator::operator--(int) +/*! \fn template QLinkedList::iterator QLinkedList::iterator::operator--(int) \overload @@ -915,7 +915,7 @@ const QLinkedListData QLinkedListData::shared_null = { current and returns an iterator to the previously current item. */ -/*! \fn QLinkedList::iterator QLinkedList::iterator::operator+(int j) const +/*! \fn template QLinkedList::iterator QLinkedList::iterator::operator+(int 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.) @@ -926,7 +926,7 @@ const QLinkedListData QLinkedListData::shared_null = { */ -/*! \fn QLinkedList::iterator QLinkedList::iterator::operator-(int j) const +/*! \fn template QLinkedList::iterator QLinkedList::iterator::operator-(int 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.) @@ -936,7 +936,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator+() */ -/*! \fn QLinkedList::iterator &QLinkedList::iterator::operator+=(int j) +/*! \fn template QLinkedList::iterator &QLinkedList::iterator::operator+=(int j) Advances the iterator by \a j items. (If \a j is negative, the iterator goes backward.) @@ -944,7 +944,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator-=(), operator+() */ -/*! \fn QLinkedList::iterator &QLinkedList::iterator::operator-=(int j) +/*! \fn template QLinkedList::iterator &QLinkedList::iterator::operator-=(int j) Makes the iterator go back by \a j items. (If \a j is negative, the iterator goes forward.) @@ -997,7 +997,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa QLinkedList::iterator, QLinkedListIterator */ -/*! \fn QLinkedList::const_iterator::const_iterator() +/*! \fn template QLinkedList::const_iterator::const_iterator() Constructs an uninitialized iterator. @@ -1008,7 +1008,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa QLinkedList::constBegin(), QLinkedList::constEnd() */ -/*! \fn QLinkedList::const_iterator::const_iterator(Node *node) +/*! \fn template QLinkedList::const_iterator::const_iterator(Node *node) \internal */ @@ -1038,37 +1038,36 @@ const QLinkedListData QLinkedListData::shared_null = { \internal */ -/*! \fn QLinkedList::const_iterator::const_iterator(const const_iterator &other) +/*! \fn template QLinkedList::const_iterator::const_iterator(const const_iterator &other) Constructs a copy of \a other. */ -/*! \fn QLinkedList::const_iterator::const_iterator(iterator other) +/*! \fn template QLinkedList::const_iterator::const_iterator(iterator other) Constructs a copy of \a other. */ -/*! \fn QLinkedList::const_iterator &QLinkedList::const_iterator::operator=( \ - const const_iterator &other) +/*! \fn template typename QLinkedList::const_iterator &QLinkedList::const_iterator::operator=(const const_iterator &other) Assigns \a other to this iterator. */ -/*! \fn const T &QLinkedList::const_iterator::operator*() const +/*! \fn template const T &QLinkedList::const_iterator::operator*() const Returns a reference to the current item. \sa operator->() */ -/*! \fn const T *QLinkedList::const_iterator::operator->() const +/*! \fn template const T *QLinkedList::const_iterator::operator->() const Returns a pointer to the current item. \sa operator*() */ -/*! \fn bool QLinkedList::const_iterator::operator==(const const_iterator &other) const +/*! \fn template bool QLinkedList::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. @@ -1076,7 +1075,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator!=() */ -/*! \fn bool QLinkedList::const_iterator::operator!=(const const_iterator &other) const +/*! \fn template bool QLinkedList::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. @@ -1084,19 +1083,19 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator==() */ -/*! \fn QLinkedList::const_iterator &QLinkedList::const_iterator::operator++() +/*! \fn template QLinkedList::const_iterator &QLinkedList::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 item. - Calling this function on QLinkedList::constEnd() leads to + Calling this function on QLinkedList::constEnd() leads to undefined results. \sa operator--() */ -/*! \fn QLinkedList::const_iterator QLinkedList::const_iterator::operator++(int) +/*! \fn template QLinkedList::const_iterator QLinkedList::const_iterator::operator++(int) \overload @@ -1105,7 +1104,7 @@ const QLinkedListData QLinkedListData::shared_null = { current item. */ -/*! \fn QLinkedList::const_iterator &QLinkedList::const_iterator::operator--() +/*! \fn template QLinkedList::const_iterator &QLinkedList::const_iterator::operator--() The prefix -- operator (\c{--it}) makes the preceding item current and returns an iterator to the new current item. @@ -1116,7 +1115,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator++() */ -/*! \fn QLinkedList::const_iterator QLinkedList::const_iterator::operator--(int) +/*! \fn template QLinkedList::const_iterator QLinkedList::const_iterator::operator--(int) \overload @@ -1124,7 +1123,7 @@ const QLinkedListData QLinkedListData::shared_null = { current and returns an iterator to the previously current item. */ -/*! \fn QLinkedList::const_iterator QLinkedList::const_iterator::operator+(int j) const +/*! \fn template QLinkedList::const_iterator QLinkedList::const_iterator::operator+(int 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.) @@ -1134,7 +1133,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator-() */ -/*! \fn QLinkedList::const_iterator QLinkedList::const_iterator::operator-(int j) const +/*! \fn template QLinkedList::const_iterator QLinkedList::const_iterator::operator-(int j) const This function returns an iterator to the item at \a j positions backward from this iterator. (If \a j is negative, the iterator goes forward.) @@ -1144,7 +1143,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator+() */ -/*! \fn QLinkedList::const_iterator &QLinkedList::const_iterator::operator+=(int j) +/*! \fn template QLinkedList::const_iterator &QLinkedList::const_iterator::operator+=(int j) Advances the iterator by \a j items. (If \a j is negative, the iterator goes backward.) @@ -1154,7 +1153,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator-=(), operator+() */ -/*! \fn QLinkedList::const_iterator &QLinkedList::const_iterator::operator-=(int j) +/*! \fn template QLinkedList::const_iterator &QLinkedList::const_iterator::operator-=(int j) Makes the iterator go back by \a j items. (If \a j is negative, the iterator goes forward.) @@ -1164,7 +1163,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa operator+=(), operator-() */ -/*! \fn QDataStream &operator<<(QDataStream &out, const QLinkedList &list) +/*! \fn template QDataStream &operator<<(QDataStream &out, const QLinkedList &list) \relates QLinkedList Writes the linked list \a list to stream \a out. @@ -1175,7 +1174,7 @@ const QLinkedListData QLinkedListData::shared_null = { \sa{Serializing Qt Data Types}{Format of the QDataStream operators} */ -/*! \fn QDataStream &operator>>(QDataStream &in, QLinkedList &list) +/*! \fn template QDataStream &operator>>(QDataStream &in, QLinkedList &list) \relates QLinkedList Reads a linked list from stream \a in into \a list. @@ -1187,7 +1186,7 @@ const QLinkedListData QLinkedListData::shared_null = { /*! \since 4.1 - \fn QLinkedList QLinkedList::fromStdList(const std::list &list) + \fn template QLinkedList QLinkedList::fromStdList(const std::list &list) Returns a QLinkedList object with the data contained in \a list. The order of the elements in the QLinkedList is the same as in \a @@ -1202,7 +1201,7 @@ const QLinkedListData QLinkedListData::shared_null = { /*! \since 4.1 - \fn std::list QLinkedList::toStdList() const + \fn template std::list QLinkedList::toStdList() const Returns a std::list object with the data contained in this QLinkedList. Example: 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 &&other) + \fn template QList::QList(QList &&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 QList::mid(int pos, int length) const + \fn template QList QList::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 QList::QList() Constructs an empty list. */ -/*! \fn QList::QList(const QList &other) +/*! \fn template QList::QList(const QList &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 args) +/*! \fn template QList::QList(std::initializer_list 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 QList::~QList() Destroys the list. References to the values in the list and all iterators of this list become invalid. */ -/*! \fn QList &QList::operator=(const QList &other) +/*! \fn template QList &QList::operator=(const QList &other) Assigns \a other to this list and returns a reference to this list. */ /*! - \fn QList &QList::operator=(QList &&other) + \fn template QList &QList::operator=(QList &&other) Move-assigns \a other to this QList instance. \since 5.2 */ -/*! \fn void QList::swap(QList &other) +/*! \fn template void QList::swap(QList &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 &other) const +/*! \fn template bool QList::operator==(const QList &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 &other) const +/*! \fn template bool QList::operator!=(const QList &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 &lhs, const QList &rhs) +/*! \fn template bool operator<(const QList &lhs, const QList &rhs) \since 5.6 \relates QList @@ -627,7 +627,7 @@ void **QListData::erase(void **xi) of \c operator<(). */ -/*! \fn bool operator<=(const QList &lhs, const QList &rhs) +/*! \fn template bool operator<=(const QList &lhs, const QList &rhs) \since 5.6 \relates QList @@ -639,7 +639,7 @@ void **QListData::erase(void **xi) of \c operator<(). */ -/*! \fn bool operator>(const QList &lhs, const QList &rhs) +/*! \fn template bool operator>(const QList &lhs, const QList &rhs) \since 5.6 \relates QList @@ -651,7 +651,7 @@ void **QListData::erase(void **xi) of \c operator<(). */ -/*! \fn bool operator>=(const QList &lhs, const QList &rhs) +/*! \fn template bool operator>=(const QList &lhs, const QList &rhs) \since 5.6 \relates QList @@ -664,7 +664,7 @@ void **QListData::erase(void **xi) */ /*! - \fn uint qHash(const QList &key, uint seed = 0) + \fn template uint qHash(const QList &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 int QList::size() const Returns the number of items in the list. \sa isEmpty(), count() */ -/*! \fn void QList::detach() +/*! \fn template void QList::detach() \internal */ -/*! \fn void QList::detachShared() +/*! \fn template void QList::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 bool QList::isDetached() const \internal */ -/*! \fn void QList::setSharable(bool sharable) +/*! \fn template void QList::setSharable(bool sharable) \internal */ -/*! \fn bool QList::isSharedWith(const QList &other) const +/*! \fn template bool QList::isSharedWith(const QList &other) const \internal */ -/*! \fn bool QList::isEmpty() const +/*! \fn template bool QList::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 void QList::clear() Removes all items from the list. \sa removeAll() */ -/*! \fn const T &QList::at(int i) const +/*! \fn template const T &QList::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 T &QList::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 const T &QList::operator[](int i) const \overload Same as at(). This function runs in \l{Algorithmic Complexity}{constant time}. */ -/*! \fn QList::reserve(int alloc) +/*! \fn template QList::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 void QList::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 &value) +/*! \fn template void QList::append(const QList &value) \overload @@ -798,7 +798,7 @@ void **QListData::erase(void **xi) \sa operator<<(), operator+=() */ -/*! \fn void QList::prepend(const T &value) +/*! \fn template void QList::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 void QList::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 QList::iterator QList::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 void QList::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 int QList::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 bool QList::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 void QList::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 T QList::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 T QList::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 T QList::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 void QList::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 void QList::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 int QList::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 int QList::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 bool QList::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 int QList::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 bool QList::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 bool QList::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 QList::iterator QList::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 QList::const_iterator QList::begin() const \overload */ -/*! \fn QList::const_iterator QList::cbegin() const +/*! \fn template QList::const_iterator QList::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 QList::const_iterator QList::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 QList::iterator QList::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 const_iterator QList::end() const \overload */ -/*! \fn QList::const_iterator QList::cend() const +/*! \fn template QList::const_iterator QList::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 QList::const_iterator QList::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 QList::reverse_iterator QList::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 QList::const_reverse_iterator QList::rbegin() const \since 5.6 \overload */ -/*! \fn QList::const_reverse_iterator QList::crbegin() const +/*! \fn template QList::const_reverse_iterator QList::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 QList::reverse_iterator QList::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 QList::const_reverse_iterator QList::rend() const \since 5.6 \overload */ -/*! \fn QList::const_reverse_iterator QList::crend() const +/*! \fn template QList::const_reverse_iterator QList::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 QList::iterator QList::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 QList::iterator QList::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 int QList::count() const Returns the number of items in the list. This is effectively the same as size(). */ -/*! \fn int QList::length() const +/*! \fn template int QList::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 T& QList::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 const T& QList::first() const \overload */ -/*! \fn const T& QList::constFirst() const +/*! \fn template const T& QList::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 T& QList::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 const T& QList::last() const \overload */ -/*! \fn const T& QList::constLast() const +/*! \fn template const T& QList::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 void QList::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 void QList::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 T QList::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 T QList::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 void QList::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 void QList::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 T& QList::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 const T& QList::front() const \overload */ -/*! \fn T& QList::back() +/*! \fn template T& QList::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 const T& QList::back() const \overload */ -/*! \fn void QList::pop_front() +/*! \fn template void QList::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 void QList::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 bool QList::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 &QList::operator+=(const QList &other) +/*! \fn template QList &QList::operator+=(const QList &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 void QList::operator+=(const T &value) \overload @@ -1415,7 +1415,7 @@ void **QListData::erase(void **xi) \sa append(), operator<<() */ -/*! \fn QList QList::operator+(const QList &other) const +/*! \fn template QList QList::operator+(const QList &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 &QList::operator<<(const QList &other) +/*! \fn template QList &QList::operator<<(const QList &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 void QList::operator<<(const T &value) \overload @@ -1521,7 +1521,7 @@ void **QListData::erase(void **xi) \internal */ -/*! \fn QList::iterator::iterator() +/*! \fn template QList::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 QList::iterator::iterator(Node *node) \internal */ -/*! \fn QList::iterator::iterator(const iterator &other) +/*! \fn template QList::iterator::iterator(const iterator &other) Constructs a copy of \a other. */ -/*! \fn T &QList::iterator::operator*() const +/*! \fn template T &QList::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 T *QList::iterator::operator->() const Returns a pointer to the current item. \sa operator*() */ -/*! \fn T &QList::iterator::operator[](difference_type j) const +/*! \fn template T &QList::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 bool QList::iterator::operator==(const iterator &other) const + \fn template bool QList::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 bool QList::iterator::operator!=(const iterator &other) const + \fn template bool QList::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 bool QList::iterator::operator<(const iterator& other) const + \fn template bool QList::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 bool QList::iterator::operator<=(const iterator& other) const + \fn template bool QList::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 bool QList::iterator::operator>(const iterator& other) const + \fn template bool QList::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 bool QList::iterator::operator>=(const iterator& other) const + \fn template bool QList::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 QList::iterator &QList::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 QList::iterator QList::iterator::operator++(int) \overload @@ -1644,7 +1644,7 @@ void **QListData::erase(void **xi) current item. */ -/*! \fn QList::iterator &QList::iterator::operator--() +/*! \fn template QList::iterator &QList::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 QList::iterator QList::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 QList::iterator &QList::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 QList::iterator &QList::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 QList::iterator QList::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 QList::iterator QList::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 int QList::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 QList::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 QList::const_iterator::const_iterator(Node *node) \internal */ -/*! \fn QList::const_iterator::const_iterator(const const_iterator &other) +/*! \fn template QList::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 QList::const_iterator::const_iterator(const iterator &other) Constructs a copy of \a other. */ -/*! \fn const T &QList::const_iterator::operator*() const +/*! \fn template const T &QList::const_iterator::operator*() const Returns the current item. \sa operator->() */ -/*! \fn const T *QList::const_iterator::operator->() const +/*! \fn template const T *QList::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 const T &QList::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 bool QList::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 bool QList::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 bool QList::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 bool QList::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 bool QList::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 bool QList::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 QList::const_iterator &QList::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 QList::const_iterator QList::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 QList::const_iterator &QList::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 QList::const_iterator QList::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 QList::const_iterator &QList::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 QList::const_iterator &QList::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 QList::const_iterator QList::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 QList::const_iterator QList::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 int QList::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 &list) +/*! \fn template QDataStream &operator<<(QDataStream &out, const QList &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 &list) +/*! \fn template QDataStream &operator>>(QDataStream &in, QList &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 QList::fromVector(const QVector &vector) +/*! \fn template QList QList::fromVector(const QVector &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 QList::toVector() const +/*! \fn template QVector QList::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 QList::fromSet(const QSet &set) +/*! \fn template QList QList::fromSet(const QSet &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 QList::toSet() const +/*! \fn template QSet QList::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 QList::fromStdList(const std::list &list) +/*! \fn template QList QList::fromStdList(const std::list &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 QList::toStdList() const +/*! \fn template std::list QList::toStdList() const Returns a std::list object with the data contained in this QList. Example: diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc index 93f157fdc5..48863f2399 100644 --- a/src/corelib/tools/qset.qdoc +++ b/src/corelib/tools/qset.qdoc @@ -96,14 +96,14 @@ */ /*! - \fn QSet::QSet() + \fn template QSet::QSet() Constructs an empty set. \sa clear() */ -/*! \fn QSet::QSet(std::initializer_list list) +/*! \fn template QSet::QSet(std::initializer_list list) \since 5.1 Constructs a set with a copy of each of the elements in the @@ -114,14 +114,14 @@ */ /*! - \fn void QSet::swap(QSet &other) + \fn template void QSet::swap(QSet &other) Swaps set \a other with this set. This operation is very fast and never fails. */ /*! - \fn bool QSet::operator==(const QSet &other) const + \fn template bool QSet::operator==(const QSet &other) const Returns \c true if the \a other set is equal to this set; otherwise returns \c false. @@ -134,7 +134,7 @@ */ /*! - \fn bool QSet::operator!=(const QSet &other) const + \fn template bool QSet::operator!=(const QSet &other) const Returns \c true if the \a other set is not equal to this set; otherwise returns \c false. @@ -147,7 +147,7 @@ */ /*! - \fn int QSet::size() const + \fn template int QSet::size() const Returns the number of items in the set. @@ -155,7 +155,7 @@ */ /*! - \fn bool QSet::isEmpty() const + \fn template bool QSet::isEmpty() const Returns \c true if the set contains no elements; otherwise returns false. @@ -164,7 +164,7 @@ */ /*! - \fn int QSet::capacity() const + \fn template int QSet::capacity() const Returns the number of buckets in the set's internal hash table. @@ -177,7 +177,7 @@ \sa reserve(), squeeze() */ -/*! \fn void QSet::reserve(int size) +/*! \fn template void QSet::reserve(int size) Ensures that the set's internal hash table consists of at least \a size buckets. @@ -201,7 +201,7 @@ */ /*! - \fn void QSet::squeeze() + \fn template void QSet::squeeze() Reduces the size of the set's internal hash table to save memory. @@ -214,7 +214,7 @@ */ /*! - \fn void QSet::detach() + \fn template void QSet::detach() \internal @@ -224,7 +224,7 @@ \sa isDetached() */ -/*! \fn bool QSet::isDetached() const +/*! \fn template bool QSet::isDetached() const \internal @@ -235,12 +235,12 @@ */ /*! - \fn void QSet::setSharable(bool sharable) + \fn template void QSet::setSharable(bool sharable) \internal */ /*! - \fn void QSet::clear() + \fn template void QSet::clear() Removes all elements from the set. @@ -248,7 +248,7 @@ */ /*! - \fn bool QSet::remove(const T &value) + \fn template bool QSet::remove(const T &value) Removes any occurrence of item \a value from the set. Returns true if an item was actually removed; otherwise returns \c false. @@ -257,7 +257,7 @@ */ /*! - \fn QSet::iterator QSet::erase(const_iterator pos) + \fn template QSet::iterator QSet::erase(const_iterator pos) \since 5.7 Removes the item at the iterator position \a pos from the set, and @@ -271,12 +271,12 @@ */ /*! - \fn QSet::iterator QSet::erase(iterator pos) + \fn template QSet::iterator QSet::erase(iterator pos) \since 4.2 \overload */ -/*! \fn QSet::const_iterator QSet::find(const T &value) const +/*! \fn template QSet::const_iterator QSet::find(const T &value) const \since 4.2 Returns a const iterator positioned at the item \a value in the @@ -286,7 +286,7 @@ \sa constFind(), contains() */ -/*! \fn QSet::iterator QSet::find(const T &value) +/*! \fn template QSet::iterator QSet::find(const T &value) \since 4.2 \overload @@ -295,7 +295,7 @@ returns end(). */ -/*! \fn QSet::const_iterator QSet::constFind(const T &value) const +/*! \fn template QSet::const_iterator QSet::constFind(const T &value) const \since 4.2 Returns a const iterator positioned at the item \a value in the @@ -306,7 +306,7 @@ */ /*! - \fn bool QSet::contains(const T &value) const + \fn template bool QSet::contains(const T &value) const Returns \c true if the set contains item \a value; otherwise returns false. @@ -315,7 +315,7 @@ */ /*! - \fn bool QSet::contains(const QSet &other) const + \fn template bool QSet::contains(const QSet &other) const \since 4.6 Returns \c true if the set contains all items from the \a other set; @@ -324,7 +324,7 @@ \sa insert(), remove(), find() */ -/*! \fn QSet::const_iterator QSet::begin() const +/*! \fn template QSet::const_iterator QSet::begin() const Returns a const \l{STL-style iterators}{STL-style iterator} positioned at the first item in the set. @@ -332,7 +332,7 @@ \sa constBegin(), end() */ -/*! \fn QSet::iterator QSet::begin() +/*! \fn template QSet::iterator QSet::begin() \since 4.2 \overload @@ -340,7 +340,7 @@ item in the set. */ -/*! \fn QSet::const_iterator QSet::cbegin() const +/*! \fn template QSet::const_iterator QSet::cbegin() const \since 5.0 Returns a const \l{STL-style iterators}{STL-style iterator} positioned at the first @@ -349,7 +349,7 @@ \sa begin(), cend() */ -/*! \fn QSet::const_iterator QSet::constBegin() const +/*! \fn template QSet::const_iterator QSet::constBegin() const Returns a const \l{STL-style iterators}{STL-style iterator} positioned at the first item in the set. @@ -357,7 +357,7 @@ \sa begin(), constEnd() */ -/*! \fn QSet::const_iterator QSet::end() const +/*! \fn template QSet::const_iterator QSet::end() const Returns a const \l{STL-style iterators}{STL-style iterator} positioned at the imaginary item after the last item in the set. @@ -365,7 +365,7 @@ \sa constEnd(), begin() */ -/*! \fn QSet::iterator QSet::end() +/*! \fn template QSet::iterator QSet::end() \since 4.2 \overload @@ -373,7 +373,7 @@ imaginary item after the last item in the set. */ -/*! \fn QSet::const_iterator QSet::cend() const +/*! \fn template QSet::const_iterator QSet::cend() const \since 5.0 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary @@ -382,7 +382,7 @@ \sa cbegin(), end() */ -/*! \fn QSet::const_iterator QSet::constEnd() const +/*! \fn template QSet::const_iterator QSet::constEnd() const Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the set. @@ -390,7 +390,7 @@ \sa constBegin(), end() */ -/*! \fn QSet::reverse_iterator QSet::rbegin() +/*! \fn template QSet::reverse_iterator QSet::rbegin() \since 5.6 Returns a \l{STL-style iterators}{STL-style} reverse iterator pointing to the first @@ -399,12 +399,12 @@ \sa begin(), crbegin(), rend() */ -/*! \fn QSet::const_reverse_iterator QSet::rbegin() const +/*! \fn template QSet::const_reverse_iterator QSet::rbegin() const \since 5.6 \overload */ -/*! \fn QSet::const_reverse_iterator QSet::crbegin() const +/*! \fn template QSet::const_reverse_iterator QSet::crbegin() const \since 5.6 Returns a const \l{STL-style iterators}{STL-style} reverse iterator pointing to the first @@ -413,7 +413,7 @@ \sa begin(), rbegin(), rend() */ -/*! \fn QSet::reverse_iterator QSet::rend() +/*! \fn template QSet::reverse_iterator QSet::rend() \since 5.6 Returns a \l{STL-style iterators}{STL-style} reverse iterator pointing to one past @@ -422,12 +422,12 @@ \sa end(), crend(), rbegin() */ -/*! \fn QSet::const_reverse_iterator QSet::rend() const +/*! \fn template QSet::const_reverse_iterator QSet::rend() const \since 5.6 \overload */ -/*! \fn QSet::const_reverse_iterator QSet::crend() const +/*! \fn template QSet::const_reverse_iterator QSet::crend() const \since 5.6 Returns a const \l{STL-style iterators}{STL-style} reverse iterator pointing to one @@ -530,7 +530,7 @@ */ /*! - \fn QSet::insert(const T &value) + \fn template QSet::insert(const T &value) Inserts item \a value into the set, if \a value isn't already in the set, and returns an iterator pointing at the inserted @@ -540,7 +540,7 @@ */ /*! - \fn QSet &QSet::unite(const QSet &other) + \fn template QSet &QSet::unite(const QSet &other) Each item in the \a other set that isn't already in this set is inserted into this set. A reference to this set is returned. @@ -549,7 +549,7 @@ */ /*! - \fn QSet &QSet::intersect(const QSet &other) + \fn template QSet &QSet::intersect(const QSet &other) Removes all items from this set that are not contained in the \a other set. A reference to this set is returned. @@ -558,7 +558,7 @@ */ /*! - \fn bool QSet::intersects(const QSet &other) const + \fn template bool QSet::intersects(const QSet &other) const \since 5.6 Returns \c true if this set has at least one item in common with @@ -568,7 +568,7 @@ */ /*! - \fn QSet &QSet::subtract(const QSet &other) + \fn template QSet &QSet::subtract(const QSet &other) Removes all items from this set that are contained in the \a other set. Returns a reference to this set. @@ -577,22 +577,22 @@ */ /*! - \fn bool QSet::empty() const + \fn template bool QSet::empty() const Returns \c true if the set is empty. This function is provided for STL compatibility. It is equivalent to isEmpty(). */ /*! - \fn bool QSet::count() const + \fn template bool QSet::count() const Same as size(). */ /*! - \fn QSet &QSet::operator<<(const T &value) - \fn QSet &QSet::operator+=(const T &value) - \fn QSet &QSet::operator|=(const T &value) + \fn template QSet &QSet::operator<<(const T &value) + \fn template QSet &QSet::operator+=(const T &value) + \fn template QSet &QSet::operator|=(const T &value) Inserts a new item \a value and returns a reference to the set. If \a value already exists in the set, the set is left unchanged. @@ -601,7 +601,7 @@ */ /*! - \fn QSet &QSet::operator-=(const T &value) + \fn template QSet &QSet::operator-=(const T &value) Removes the occurrence of item \a value from the set, if it is found, and returns a reference to the set. If the @@ -611,8 +611,8 @@ */ /*! - \fn QSet &QSet::operator|=(const QSet &other) - \fn QSet &QSet::operator+=(const QSet &other) + \fn template QSet &QSet::operator|=(const QSet &other) + \fn template QSet &QSet::operator+=(const QSet &other) Same as unite(\a other). @@ -620,7 +620,7 @@ */ /*! - \fn QSet &QSet::operator&=(const QSet &other) + \fn template QSet &QSet::operator&=(const QSet &other) Same as intersect(\a other). @@ -628,7 +628,7 @@ */ /*! - \fn QSet &QSet::operator&=(const T &value) + \fn template QSet &QSet::operator&=(const T &value) \overload @@ -638,7 +638,7 @@ /*! - \fn QSet &QSet::operator-=(const QSet &other) + \fn template QSet &QSet::operator-=(const QSet &other) Same as subtract(\a{other}). @@ -646,8 +646,8 @@ */ /*! - \fn QSet QSet::operator|(const QSet &other) const - \fn QSet QSet::operator+(const QSet &other) const + \fn template QSet QSet::operator|(const QSet &other) const + \fn template QSet QSet::operator+(const QSet &other) const Returns a new QSet that is the union of this set and the \a other set. @@ -656,7 +656,7 @@ */ /*! - \fn QSet QSet::operator&(const QSet &other) const + \fn template QSet QSet::operator&(const QSet &other) const Returns a new QSet that is the intersection of this set and the \a other set. @@ -665,7 +665,7 @@ */ /*! - \fn QSet QSet::operator-(const QSet &other) const + \fn template QSet QSet::operator-(const QSet &other) const Returns a new QSet that is the set difference of this set and the \a other set, i.e., this set - \a other set. @@ -766,8 +766,8 @@ */ /*! - \fn QSet::iterator::iterator() - \fn QSet::const_iterator::const_iterator() + \fn template QSet::iterator::iterator() + \fn template QSet::const_iterator::const_iterator() Constructs an uninitialized iterator. @@ -779,8 +779,8 @@ */ /*! - \fn QSet::iterator::iterator(typename Hash::iterator i) - \fn QSet::const_iterator::const_iterator(typename Hash::const_iterator i) + \fn template QSet::iterator::iterator(typename Hash::iterator i) + \fn template QSet::const_iterator::const_iterator(typename Hash::const_iterator i) \internal */ @@ -822,14 +822,14 @@ */ /*! - \fn QSet::iterator::iterator(const iterator &other) - \fn QSet::const_iterator::const_iterator(const const_iterator &other) + \fn template QSet::iterator::iterator(const iterator &other) + \fn template QSet::const_iterator::const_iterator(const const_iterator &other) Constructs a copy of \a other. */ /*! - \fn QSet::const_iterator::const_iterator(const iterator &other) + \fn template QSet::const_iterator::const_iterator(const iterator &other) \since 4.2 \overload @@ -837,15 +837,15 @@ */ /*! - \fn QSet::iterator &QSet::iterator::operator=(const iterator &other) - \fn QSet::const_iterator &QSet::const_iterator::operator=(const const_iterator &other) + \fn template QSet::iterator &QSet::iterator::operator=(const iterator &other) + \fn template QSet::const_iterator &QSet::const_iterator::operator=(const const_iterator &other) Assigns \a other to this iterator. */ /*! - \fn const T &QSet::iterator::operator*() const - \fn const T &QSet::const_iterator::operator*() const + \fn template const T &QSet::iterator::operator*() const + \fn template const T &QSet::const_iterator::operator*() const Returns a reference to the current item. @@ -853,8 +853,8 @@ */ /*! - \fn const T *QSet::iterator::operator->() const - \fn const T *QSet::const_iterator::operator->() const + \fn template const T *QSet::iterator::operator->() const + \fn template const T *QSet::const_iterator::operator->() const Returns a pointer to the current item. @@ -862,8 +862,8 @@ */ /*! - \fn bool QSet::iterator::operator==(const iterator &other) const - \fn bool QSet::const_iterator::operator==(const const_iterator &other) const + \fn template bool QSet::iterator::operator==(const iterator &other) const + \fn template bool QSet::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. @@ -872,15 +872,15 @@ */ /*! - \fn bool QSet::iterator::operator==(const const_iterator &other) const - \fn bool QSet::iterator::operator!=(const const_iterator &other) const + \fn template bool QSet::iterator::operator==(const const_iterator &other) const + \fn template bool QSet::iterator::operator!=(const const_iterator &other) const \overload */ /*! - \fn bool QSet::iterator::operator!=(const iterator &other) const - \fn bool QSet::const_iterator::operator!=(const const_iterator &other) const + \fn template bool QSet::iterator::operator!=(const iterator &other) const + \fn template bool QSet::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. @@ -889,22 +889,22 @@ */ /*! - \fn QSet::iterator &QSet::iterator::operator++() - \fn QSet::const_iterator &QSet::const_iterator::operator++() + \fn template QSet::iterator &QSet::iterator::operator++() + \fn template QSet::const_iterator &QSet::const_iterator::operator++() The prefix ++ operator (\c{++it}) advances the iterator to the next item in the set and returns an iterator to the new current item. - Calling this function on QSet::constEnd() leads to + Calling this function on QSet::constEnd() leads to undefined results. \sa operator--() */ /*! - \fn QSet::iterator QSet::iterator::operator++(int) - \fn QSet::const_iterator QSet::const_iterator::operator++(int) + \fn template QSet::iterator QSet::iterator::operator++(int) + \fn template QSet::const_iterator QSet::const_iterator::operator++(int) \overload @@ -914,8 +914,8 @@ */ /*! - \fn QSet::iterator &QSet::iterator::operator--() - \fn QSet::const_iterator &QSet::const_iterator::operator--() + \fn template QSet::iterator &QSet::iterator::operator--() + \fn template QSet::const_iterator &QSet::const_iterator::operator--() The prefix -- operator (\c{--it}) makes the preceding item current and returns an iterator to the new current item. @@ -927,8 +927,8 @@ */ /*! - \fn QSet::iterator QSet::iterator::operator--(int) - \fn QSet::const_iterator QSet::const_iterator::operator--(int) + \fn template QSet::iterator QSet::iterator::operator--(int) + \fn template QSet::const_iterator QSet::const_iterator::operator--(int) \overload @@ -937,8 +937,8 @@ */ /*! - \fn QSet::iterator QSet::iterator::operator+(int j) const - \fn QSet::const_iterator QSet::const_iterator::operator+(int j) const + \fn template QSet::iterator QSet::iterator::operator+(int j) const + \fn template QSet::const_iterator QSet::const_iterator::operator+(int 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.) @@ -949,8 +949,8 @@ */ /*! - \fn QSet::iterator QSet::iterator::operator-(int j) const - \fn QSet::const_iterator QSet::const_iterator::operator-(int j) const + \fn template QSet::iterator QSet::iterator::operator-(int j) const + \fn template QSet::const_iterator QSet::const_iterator::operator-(int 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.) @@ -961,8 +961,8 @@ */ /*! - \fn QSet::iterator &QSet::iterator::operator+=(int j) - \fn QSet::const_iterator &QSet::const_iterator::operator+=(int j) + \fn template QSet::iterator &QSet::iterator::operator+=(int j) + \fn template QSet::const_iterator &QSet::const_iterator::operator+=(int j) Advances the iterator by \a j items. (If \a j is negative, the iterator goes backward.) @@ -973,8 +973,8 @@ */ /*! - \fn QSet::iterator &QSet::iterator::operator-=(int j) - \fn QSet::const_iterator &QSet::const_iterator::operator-=(int j) + \fn template QSet::iterator &QSet::iterator::operator-=(int j) + \fn template QSet::const_iterator &QSet::const_iterator::operator-=(int j) Makes the iterator go back by \a j items. (If \a j is negative, the iterator goes forward.) @@ -984,7 +984,7 @@ \sa operator+=(), operator-() */ -/*! \fn QList QSet::toList() const +/*! \fn template QList QSet::toList() const Returns a new QList containing the elements in the set. The order of the elements in the QList is undefined. @@ -996,7 +996,7 @@ \sa fromList(), QList::fromSet() */ -/*! \fn QList QSet::values() const +/*! \fn template QList QSet::values() const Returns a new QList containing the elements in the set. The order of the elements in the QList is undefined. @@ -1007,7 +1007,7 @@ */ -/*! \fn QSet QSet::fromList(const QList &list) +/*! \fn template QSet QSet::fromList(const QList &list) Returns a new QSet object containing the data contained in \a list. Since QSet doesn't allow duplicates, the resulting QSet @@ -1022,7 +1022,7 @@ */ /*! - \fn QDataStream &operator<<(QDataStream &out, const QSet &set) + \fn template QDataStream &operator<<(QDataStream &out, const QSet &set) \relates QSet Writes the \a set to stream \a out. @@ -1033,7 +1033,7 @@ */ /*! - \fn QDataStream &operator>>(QDataStream &in, QSet &set) + \fn template QDataStream &operator>>(QDataStream &in, QSet &set) \relates QSet Reads a set from stream \a in into \a set. @@ -1044,7 +1044,7 @@ */ /*! - \fn uint qHash(const QSet &key, uint seed = 0) + \fn template uint qHash(const QSet &key, uint seed = 0) \relates QHash \since 5.5 diff --git a/src/corelib/tools/qvector.qdoc b/src/corelib/tools/qvector.qdoc index 61fb3d494d..1068de76d5 100644 --- a/src/corelib/tools/qvector.qdoc +++ b/src/corelib/tools/qvector.qdoc @@ -189,7 +189,7 @@ */ /*! - \fn QVector QVector::mid(int pos, int length = -1) const + \fn template QVector QVector::mid(int pos, int length = -1) const Returns a sub-vector which contains elements from this vector, starting at position \a pos. If \a length is -1 (the default), all @@ -199,7 +199,7 @@ */ -/*! \fn QVector::QVector() +/*! \fn template QVector::QVector() Constructs an empty vector. @@ -207,7 +207,7 @@ */ /*! - \fn QVector::QVector(QVector &&other) + \fn template QVector::QVector(QVector &&other) Move-constructs a QVector instance, making it point at the same object that \a other was pointing to. @@ -215,7 +215,7 @@ \since 5.2 */ -/*! \fn QVector::QVector(int size) +/*! \fn template QVector::QVector(int size) Constructs a vector with an initial size of \a size elements. @@ -225,7 +225,7 @@ \sa resize() */ -/*! \fn QVector::QVector(int size, const T &value) +/*! \fn template QVector::QVector(int size, const T &value) Constructs a vector with an initial size of \a size elements. Each element is initialized with \a value. @@ -233,7 +233,7 @@ \sa resize(), fill() */ -/*! \fn QVector::QVector(const QVector &other) +/*! \fn template QVector::QVector(const QVector &other) Constructs a copy of \a other. @@ -246,7 +246,7 @@ \sa operator=() */ -/*! \fn QVector::QVector(std::initializer_list args) +/*! \fn template QVector::QVector(std::initializer_list args) \since 4.8 Constructs a vector from the std::initializer_list given by \a args. @@ -256,33 +256,33 @@ */ -/*! \fn QVector::~QVector() +/*! \fn template QVector::~QVector() Destroys the vector. */ -/*! \fn QVector &QVector::operator=(const QVector &other) +/*! \fn template QVector &QVector::operator=(const QVector &other) Assigns \a other to this vector and returns a reference to this vector. */ /*! - \fn QVector &QVector::operator=(QVector &&other) + \fn template QVector &QVector::operator=(QVector &&other) Move-assigns \a other to this QVector instance. \since 5.2 */ -/*! \fn void QVector::swap(QVector &other) +/*! \fn template void QVector::swap(QVector &other) \since 4.8 Swaps vector \a other with this vector. This operation is very fast and never fails. */ -/*! \fn bool QVector::operator==(const QVector &other) const +/*! \fn template bool QVector::operator==(const QVector &other) const Returns \c true if \a other is equal to this vector; otherwise returns \c false. @@ -296,7 +296,7 @@ \sa operator!=() */ -/*! \fn bool QVector::operator!=(const QVector &other) const +/*! \fn template bool QVector::operator!=(const QVector &other) const Returns \c true if \a other is not equal to this vector; otherwise returns \c false. @@ -310,7 +310,7 @@ \sa operator==() */ -/*! \fn bool operator<(const QVector &lhs, const QVector &rhs) +/*! \fn template bool operator<(const QVector &lhs, const QVector &rhs) \since 5.6 \relates QVector @@ -322,7 +322,7 @@ of \c operator<(). */ -/*! \fn bool operator<=(const QVector &lhs, const QVector &rhs) +/*! \fn template bool operator<=(const QVector &lhs, const QVector &rhs) \since 5.6 \relates QVector @@ -334,7 +334,7 @@ of \c operator<(). */ -/*! \fn bool operator>(const QVector &lhs, const QVector &rhs) +/*! \fn template bool operator>(const QVector &lhs, const QVector &rhs) \since 5.6 \relates QVector @@ -346,7 +346,7 @@ of \c operator<(). */ -/*! \fn bool operator>=(const QVector &lhs, const QVector &rhs) +/*! \fn template bool operator>=(const QVector &lhs, const QVector &rhs) \since 5.6 \relates QVector @@ -359,7 +359,7 @@ */ /*! - \fn uint qHash(const QVector &key, uint seed = 0) + \fn template uint qHash(const QVector &key, uint seed = 0) \since 5.6 \relates QVector @@ -369,21 +369,21 @@ This function requires qHash() to be overloaded for the value type \c T. */ -/*! \fn int QVector::size() const +/*! \fn template int QVector::size() const Returns the number of items in the vector. \sa isEmpty(), resize() */ -/*! \fn bool QVector::isEmpty() const +/*! \fn template bool QVector::isEmpty() const Returns \c true if the vector has size 0; otherwise returns \c false. \sa size(), resize() */ -/*! \fn void QVector::resize(int size) +/*! \fn template void QVector::resize(int size) Sets the size of the vector to \a size. If \a size is greater than the current size, elements are added to the end; the new elements are @@ -396,7 +396,7 @@ \sa size() */ -/*! \fn int QVector::capacity() const +/*! \fn template int QVector::capacity() const Returns the maximum number of items that can be stored in the vector without forcing a reallocation. @@ -409,7 +409,7 @@ \sa reserve(), squeeze() */ -/*! \fn void QVector::reserve(int size) +/*! \fn template void QVector::reserve(int size) Attempts to allocate memory for at least \a size elements. If you know in advance how large the vector will be, you should call this @@ -434,7 +434,7 @@ \sa squeeze(), capacity() */ -/*! \fn void QVector::squeeze() +/*! \fn template void QVector::squeeze() Releases any memory not required to store the items. @@ -445,27 +445,27 @@ \sa reserve(), capacity() */ -/*! \fn void QVector::detach() +/*! \fn template void QVector::detach() \internal */ -/*! \fn bool QVector::isDetached() const +/*! \fn template bool QVector::isDetached() const \internal */ -/*! \fn void QVector::setSharable(bool sharable) +/*! \fn template void QVector::setSharable(bool sharable) \internal */ -/*! \fn bool QVector::isSharedWith(const QVector &other) const +/*! \fn template bool QVector::isSharedWith(const QVector &other) const \internal */ -/*! \fn T *QVector::data() +/*! \fn template T *QVector::data() Returns a pointer to the data stored in the vector. The pointer can be used to access and modify the items in the vector. @@ -482,12 +482,12 @@ \sa constData(), operator[]() */ -/*! \fn const T *QVector::data() const +/*! \fn template const T *QVector::data() const \overload */ -/*! \fn const T *QVector::constData() const +/*! \fn template const T *QVector::constData() const Returns a const pointer to the data stored in the vector. The pointer can be used to access the items in the vector. @@ -500,7 +500,7 @@ \sa data(), operator[]() */ -/*! \fn void QVector::clear() +/*! \fn template void QVector::clear() Removes all the elements from the vector. @@ -517,7 +517,7 @@ \sa squeeze() */ -/*! \fn const T &QVector::at(int i) const +/*! \fn template const T &QVector::at(int i) const Returns the item at index position \a i in the vector. @@ -527,7 +527,7 @@ \sa value(), operator[]() */ -/*! \fn T &QVector::operator[](int i) +/*! \fn template T &QVector::operator[](int i) Returns the item at index position \a i as a modifiable reference. @@ -540,7 +540,7 @@ \sa at(), value() */ -/*! \fn const T &QVector::operator[](int i) const +/*! \fn template const T &QVector::operator[](int i) const \overload @@ -548,7 +548,7 @@ */ /*! - \fn void QVector::append(const T &value) + \fn template void QVector::append(const T &value) Inserts \a value at the end of the vector. @@ -566,7 +566,7 @@ */ /*! - \fn void QVector::append(T &&value) + \fn template void QVector::append(T &&value) \since 5.6 \overload @@ -575,7 +575,7 @@ \snippet code/src_corelib_tools_qvector.cpp move-append */ -/*! \fn void QVector::append(const QVector &value) +/*! \fn template void QVector::append(const QVector &value) \overload @@ -587,7 +587,7 @@ */ -/*! \fn void QVector::prepend(const T &value) +/*! \fn template void QVector::prepend(const T &value) Inserts \a value at the beginning of the vector. @@ -605,7 +605,7 @@ \sa append(), insert() */ -/*! \fn void QVector::insert(int i, const T &value) +/*! \fn template void QVector::insert(int i, const T &value) Inserts \a value at index position \a i in the vector. If \a i is 0, the value is prepended to the vector. If \a i is size(), the @@ -623,7 +623,7 @@ \sa append(), prepend(), remove() */ -/*! \fn void QVector::insert(int i, int count, const T &value) +/*! \fn template void QVector::insert(int i, int count, const T &value) \overload @@ -634,7 +634,7 @@ \snippet code/src_corelib_tools_qvector.cpp 10 */ -/*! \fn QVector::iterator QVector::insert(iterator before, const T &value) +/*! \fn template QVector::iterator QVector::insert(iterator before, const T &value) \overload @@ -642,14 +642,14 @@ \a before. Returns an iterator pointing at the inserted item. */ -/*! \fn QVector::iterator QVector::insert(iterator before, int count, const T &value) +/*! \fn template QVector::iterator QVector::insert(iterator before, int count, const T &value) Inserts \a count copies of \a value in front of the item pointed to by the iterator \a before. Returns an iterator pointing at the first of the inserted items. */ -/*! \fn void QVector::replace(int i, const T &value) +/*! \fn template void QVector::replace(int i, const T &value) Replaces the item at index position \a i with \a value. @@ -659,7 +659,7 @@ \sa operator[](), remove() */ -/*! \fn void QVector::remove(int i) +/*! \fn template void QVector::remove(int i) \overload @@ -668,7 +668,7 @@ \sa insert(), replace(), fill() */ -/*! \fn void QVector::remove(int i, int count) +/*! \fn template void QVector::remove(int i, int count) \overload @@ -678,7 +678,7 @@ \sa insert(), replace(), fill() */ -/*! \fn void QVector::removeAt(int i) +/*! \fn template void QVector::removeAt(int i) \since 5.2 Removes the element at index position \a i. @@ -692,7 +692,7 @@ \sa remove(), QList::removeAt() */ -/*! \fn int QVector::removeAll(const T &t) +/*! \fn template int QVector::removeAll(const T &t) \since 5.4 Removes all elements that compare equal to \a t from the @@ -703,7 +703,7 @@ \sa removeOne(), QList::removeAll() */ -/*! \fn bool QVector::removeOne(const T &t) +/*! \fn template bool QVector::removeOne(const T &t) \since 5.4 Removes the first element that compares equal to \a t from the @@ -714,7 +714,7 @@ \sa removeAll(), QList::removeOne() */ -/*! \fn int QVector::length() const +/*! \fn template int QVector::length() const \since 5.2 Same as size() and count(). @@ -724,7 +724,7 @@ \sa size(), count(), QList::length() */ -/*! \fn T QVector::takeAt(int i) +/*! \fn template T QVector::takeAt(int i) \since 5.2 Removes the element at index position \a i and returns it. @@ -741,7 +741,7 @@ \sa takeFirst(), takeLast(), QList::takeAt() */ -/*! \fn void QVector::move(int from, int to) +/*! \fn template void QVector::move(int from, int to) \since 5.6 Moves the item at index position \a from to index position \a to. @@ -751,7 +751,7 @@ \sa QList::move() */ -/*! \fn void QVector::removeFirst() +/*! \fn template void QVector::removeFirst() \since 5.1 Removes the first item in the vector. Calling this function is equivalent to calling remove(0). The vector must not be empty. If @@ -761,7 +761,7 @@ \sa remove(), takeFirst(), isEmpty() */ -/*! \fn void QVector::removeLast() +/*! \fn template void QVector::removeLast() \since 5.1 Removes the last item in the vector. Calling this function is equivalent to calling remove(size() - 1). The vector must not be @@ -771,7 +771,7 @@ \sa remove(), takeLast(), removeFirst(), isEmpty() */ -/*! \fn T QVector::takeFirst() +/*! \fn template T QVector::takeFirst() \since 5.1 Removes the first item in the vector and returns it. This function @@ -781,7 +781,7 @@ \sa takeLast(), removeFirst() */ -/*! \fn T QVector::takeLast() +/*! \fn template T QVector::takeLast() \since 5.1 Removes the last item in the list and returns it. This function @@ -795,7 +795,7 @@ */ -/*! \fn QVector &QVector::fill(const T &value, int size = -1) +/*! \fn template QVector &QVector::fill(const T &value, int size = -1) Assigns \a value to all items in the vector. If \a size is different from -1 (the default), the vector is resized to size \a @@ -807,7 +807,7 @@ \sa resize() */ -/*! \fn int QVector::indexOf(const T &value, int from = 0) const +/*! \fn template int QVector::indexOf(const T &value, int from = 0) const Returns the index position of the first occurrence of \a value in the vector, searching forward from index position \a from. @@ -822,7 +822,7 @@ \sa lastIndexOf(), contains() */ -/*! \fn int QVector::lastIndexOf(const T &value, int from = -1) const +/*! \fn template int QVector::lastIndexOf(const T &value, int from = -1) const Returns the index position of the last occurrence of the value \a value in the vector, searching backward from index position \a @@ -838,7 +838,7 @@ \sa indexOf() */ -/*! \fn bool QVector::contains(const T &value) const +/*! \fn template bool QVector::contains(const T &value) const Returns \c true if the vector contains an occurrence of \a value; otherwise returns \c false. @@ -849,7 +849,7 @@ \sa indexOf(), count() */ -/*! \fn bool QVector::startsWith(const T &value) const +/*! \fn template bool QVector::startsWith(const T &value) const \since 4.5 Returns \c true if this vector is not empty and its first @@ -858,7 +858,7 @@ \sa isEmpty(), first() */ -/*! \fn bool QVector::endsWith(const T &value) const +/*! \fn template bool QVector::endsWith(const T &value) const \since 4.5 Returns \c true if this vector is not empty and its last @@ -868,7 +868,7 @@ */ -/*! \fn int QVector::count(const T &value) const +/*! \fn template int QVector::count(const T &value) const Returns the number of occurrences of \a value in the vector. @@ -878,14 +878,14 @@ \sa contains(), indexOf() */ -/*! \fn int QVector::count() const +/*! \fn template int QVector::count() const \overload Same as size(). */ -/*! \fn QVector::iterator QVector::begin() +/*! \fn template QVector::iterator QVector::begin() Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the vector. @@ -893,12 +893,12 @@ \sa constBegin(), end() */ -/*! \fn QVector::const_iterator QVector::begin() const +/*! \fn template QVector::const_iterator QVector::begin() const \overload */ -/*! \fn QVector::const_iterator QVector::cbegin() const +/*! \fn template QVector::const_iterator QVector::cbegin() const \since 5.0 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item @@ -907,7 +907,7 @@ \sa begin(), cend() */ -/*! \fn QVector::const_iterator QVector::constBegin() const +/*! \fn template QVector::const_iterator QVector::constBegin() const Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the vector. @@ -915,7 +915,7 @@ \sa begin(), constEnd() */ -/*! \fn QVector::iterator QVector::end() +/*! \fn template QVector::iterator QVector::end() Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the vector. @@ -923,12 +923,12 @@ \sa begin(), constEnd() */ -/*! \fn QVector::const_iterator QVector::end() const +/*! \fn template QVector::const_iterator QVector::end() const \overload */ -/*! \fn QVector::const_iterator QVector::cend() const +/*! \fn template QVector::const_iterator QVector::cend() const \since 5.0 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary @@ -937,7 +937,7 @@ \sa cbegin(), end() */ -/*! \fn QVector::const_iterator QVector::constEnd() const +/*! \fn template QVector::const_iterator QVector::constEnd() const Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the vector. @@ -945,7 +945,7 @@ \sa constBegin(), end() */ -/*! \fn QVector::reverse_iterator QVector::rbegin() +/*! \fn template QVector::reverse_iterator QVector::rbegin() \since 5.6 Returns a \l{STL-style iterators}{STL-style} reverse iterator pointing to the first @@ -954,12 +954,12 @@ \sa begin(), crbegin(), rend() */ -/*! \fn QVector::const_reverse_iterator QVector::rbegin() const +/*! \fn template QVector::const_reverse_iterator QVector::rbegin() const \since 5.6 \overload */ -/*! \fn QVector::const_reverse_iterator QVector::crbegin() const +/*! \fn template QVector::const_reverse_iterator QVector::crbegin() const \since 5.6 Returns a const \l{STL-style iterators}{STL-style} reverse iterator pointing to the first @@ -968,7 +968,7 @@ \sa begin(), rbegin(), rend() */ -/*! \fn QVector::reverse_iterator QVector::rend() +/*! \fn template QVector::reverse_iterator QVector::rend() \since 5.6 Returns a \l{STL-style iterators}{STL-style} reverse iterator pointing to one past @@ -977,12 +977,12 @@ \sa end(), crend(), rbegin() */ -/*! \fn QVector::const_reverse_iterator QVector::rend() const +/*! \fn template QVector::const_reverse_iterator QVector::rend() const \since 5.6 \overload */ -/*! \fn QVector::const_reverse_iterator QVector::crend() const +/*! \fn template QVector::const_reverse_iterator QVector::crend() const \since 5.6 Returns a const \l{STL-style iterators}{STL-style} reverse iterator pointing to one @@ -991,7 +991,7 @@ \sa end(), rend(), rbegin() */ -/*! \fn QVector::iterator QVector::erase(iterator pos) +/*! \fn template QVector::iterator QVector::erase(iterator pos) Removes the item pointed to by the iterator \a pos from the vector, and returns an iterator to the next item in the vector @@ -1000,7 +1000,7 @@ \sa insert(), remove() */ -/*! \fn QVector::iterator QVector::erase(iterator begin, iterator end) +/*! \fn template QVector::iterator QVector::erase(iterator begin, iterator end) \overload @@ -1009,7 +1009,7 @@ before the call. */ -/*! \fn T& QVector::first() +/*! \fn template T& QVector::first() Returns a reference to the first item in the vector. This function assumes that the vector isn't empty. @@ -1017,12 +1017,12 @@ \sa last(), isEmpty(), constFirst() */ -/*! \fn const T& QVector::first() const +/*! \fn template const T& QVector::first() const \overload */ -/*! \fn const T& QVector::constFirst() const +/*! \fn template const T& QVector::constFirst() const \since 5.6 Returns a const reference to the first item in the vector. This @@ -1031,7 +1031,7 @@ \sa constLast(), isEmpty(), first() */ -/*! \fn T& QVector::last() +/*! \fn template T& QVector::last() Returns a reference to the last item in the vector. This function assumes that the vector isn't empty. @@ -1039,12 +1039,12 @@ \sa first(), isEmpty(), constLast() */ -/*! \fn const T& QVector::last() const +/*! \fn template const T& QVector::last() const \overload */ -/*! \fn const T& QVector::constLast() const +/*! \fn template const T& QVector::constLast() const \since 5.6 Returns a const reference to the last item in the vector. This function @@ -1053,7 +1053,7 @@ \sa constFirst(), isEmpty(), last() */ -/*! \fn T QVector::value(int i) const +/*! \fn template T QVector::value(int i) const Returns the value at index position \a i in the vector. @@ -1065,7 +1065,7 @@ \sa at(), operator[]() */ -/*! \fn T QVector::value(int i, const T &defaultValue) const +/*! \fn template T QVector::value(int i, const T &defaultValue) const \overload @@ -1073,72 +1073,72 @@ \a defaultValue. */ -/*! \fn void QVector::push_back(const T &value) +/*! \fn template void QVector::push_back(const T &value) This function is provided for STL compatibility. It is equivalent to append(\a value). */ -/*! \fn void QVector::push_back(T &&value) +/*! \fn template void QVector::push_back(T &&value) \since 5.6 \overload */ -/*! \fn void QVector::push_front(const T &value) +/*! \fn template void QVector::push_front(const T &value) This function is provided for STL compatibility. It is equivalent to prepend(\a value). */ -/*! \fn void QVector::pop_front() +/*! \fn template void QVector::pop_front() This function is provided for STL compatibility. It is equivalent to removeFirst(). */ -/*! \fn void QVector::pop_back() +/*! \fn template void QVector::pop_back() This function is provided for STL compatibility. It is equivalent to removeLast(). */ -/*! \fn T& QVector::front() +/*! \fn template T& QVector::front() This function is provided for STL compatibility. It is equivalent to first(). */ -/*! \fn QVector::const_reference QVector::front() const +/*! \fn template QVector::const_reference QVector::front() const \overload */ -/*! \fn QVector::reference QVector::back() +/*! \fn template QVector::reference QVector::back() This function is provided for STL compatibility. It is equivalent to last(). */ -/*! \fn QVector::const_reference QVector::back() const +/*! \fn template QVector::const_reference QVector::back() const \overload */ -/*! \fn void QVector::shrink_to_fit() +/*! \fn template void QVector::shrink_to_fit() \since 5.10 This function is provided for STL compatibility. It is equivalent to squeeze(). */ -/*! \fn bool QVector::empty() const +/*! \fn template bool QVector::empty() const This function is provided for STL compatibility. It is equivalent to isEmpty(), returning \c true if the vector is empty; otherwise returns \c false. */ -/*! \fn QVector &QVector::operator+=(const QVector &other) +/*! \fn template QVector &QVector::operator+=(const QVector &other) Appends the items of the \a other vector to this vector and returns a reference to this vector. @@ -1146,7 +1146,7 @@ \sa operator+(), append() */ -/*! \fn void QVector::operator+=(const T &value) +/*! \fn template void QVector::operator+=(const T &value) \overload @@ -1155,7 +1155,7 @@ \sa append(), operator<<() */ -/*! \fn QVector QVector::operator+(const QVector &other) const +/*! \fn template QVector QVector::operator+(const QVector &other) const Returns a vector that contains all the items in this vector followed by all the items in the \a other vector. @@ -1163,7 +1163,7 @@ \sa operator+=() */ -/*! \fn QVector &QVector::operator<<(const T &value) +/*! \fn template QVector &QVector::operator<<(const T &value) Appends \a value to the vector and returns a reference to this vector. @@ -1171,7 +1171,7 @@ \sa append(), operator+=() */ -/*! \fn QVector &QVector::operator<<(const QVector &other) +/*! \fn template QVector &QVector::operator<<(const QVector &other) Appends \a other to the vector and returns a reference to the vector. @@ -1288,7 +1288,7 @@ Typedef for T. Provided for STL compatibility. */ -/*! \fn QList QVector::toList() const +/*! \fn template QList QVector::toList() const Returns a QList object with the data contained in this QVector. @@ -1299,7 +1299,7 @@ \sa fromList(), QList::fromVector() */ -/*! \fn QVector QVector::fromList(const QList &list) +/*! \fn template QVector QVector::fromList(const QList &list) Returns a QVector object with the data contained in \a list. @@ -1310,7 +1310,7 @@ \sa toList(), QList::toVector() */ -/*! \fn QVector QVector::fromStdVector(const std::vector &vector) +/*! \fn template QVector QVector::fromStdVector(const std::vector &vector) Returns a QVector object with the data contained in \a vector. The order of the elements in the QVector is the same as in \a vector. @@ -1322,7 +1322,7 @@ \sa toStdVector(), QList::fromStdList() */ -/*! \fn std::vector QVector::toStdVector() const +/*! \fn template std::vector QVector::toStdVector() const Returns a std::vector object with the data contained in this QVector. Example: @@ -1332,7 +1332,7 @@ \sa fromStdVector(), QList::toStdList() */ -/*! \fn QDataStream &operator<<(QDataStream &out, const QVector &vector) +/*! \fn template QDataStream &operator<<(QDataStream &out, const QVector &vector) \relates QVector Writes the vector \a vector to stream \a out. @@ -1342,7 +1342,7 @@ \sa{Serializing Qt Data Types}{Format of the QDataStream operators} */ -/*! \fn QDataStream &operator>>(QDataStream &in, QVector &vector) +/*! \fn template QDataStream &operator>>(QDataStream &in, QVector &vector) \relates QVector Reads a vector from stream \a in into \a vector. -- cgit v1.2.3