From ef7c0594bf9e41813c9c841e00c3a52269d363f5 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 12 Sep 2017 12:35:29 +0200 Subject: Add template text to \fn commands in qmap.cpp 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. Change-Id: I7def18f35745b984cc1e2da7c351403d98d8668c Reviewed-by: Topi Reiniƶ --- src/corelib/tools/qmap.cpp | 280 +++++++++++++++++++++++---------------------- 1 file changed, 146 insertions(+), 134 deletions(-) diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp index afdd30e5c8..5a20c581e9 100644 --- a/src/corelib/tools/qmap.cpp +++ b/src/corelib/tools/qmap.cpp @@ -509,7 +509,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa QMapIterator, QMutableMapIterator, QHash, QSet */ -/*! \fn QMap::QMap() +/*! \fn template QMap::QMap() Constructs an empty map. @@ -517,7 +517,7 @@ void QMapDataBase::freeData(QMapDataBase *d) */ /*! - \fn QMap::QMap(QMap &&other) + \fn template QMap::QMap(QMap &&other) Move-constructs a QMap instance, making it point at the same object that \a other was pointing to. @@ -525,7 +525,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \since 5.2 */ -/*! \fn QMap::QMap(const QMap &other) +/*! \fn template QMap::QMap(const QMap &other) Constructs a copy of \a other. @@ -537,14 +537,14 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator=() */ -/*! \fn QMap::QMap(const std::map & other) +/*! \fn template QMap::QMap(const std::map & other) Constructs a copy of \a other. \sa toStdMap() */ -/*! \fn QMap::QMap(std::initializer_list > list) +/*! \fn template QMap::QMap(std::initializer_list > list) \since 5.1 Constructs a map with a copy of each of the elements in the @@ -554,45 +554,45 @@ void QMapDataBase::freeData(QMapDataBase *d) compiled in C++11 mode. */ -/*! \fn std::map QMap::toStdMap() const +/*! \fn template std::map QMap::toStdMap() const Returns an STL map equivalent to this QMap. */ -/*! \fn QMap::~QMap() +/*! \fn template QMap::~QMap() Destroys the map. References to the values in the map, and all iterators over this map, become invalid. */ -/*! \fn QMap &QMap::operator=(const QMap &other) +/*! \fn template QMap &QMap::operator=(const QMap &other) Assigns \a other to this map and returns a reference to this map. */ /*! - \fn QMap &QMap::operator=(QMap &&other) + \fn template QMap &QMap::operator=(QMap &&other) Move-assigns \a other to this QMap instance. \since 5.2 */ -/*! \fn void QMap::swap(QMap &other) +/*! \fn template void QMap::swap(QMap &other) \since 4.8 Swaps map \a other with this map. This operation is very fast and never fails. */ -/*! \fn void QMultiMap::swap(QMultiMap &other) +/*! \fn template void QMultiMap::swap(QMultiMap &other) \since 4.8 Swaps map \a other with this map. This operation is very fast and never fails. */ -/*! \fn bool QMap::operator==(const QMap &other) const +/*! \fn template bool QMap::operator==(const QMap &other) const Returns \c true if \a other is equal to this map; otherwise returns false. @@ -606,7 +606,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator!=() */ -/*! \fn bool QMap::operator!=(const QMap &other) const +/*! \fn template bool QMap::operator!=(const QMap &other) const Returns \c true if \a other is not equal to this map; otherwise returns \c false. @@ -620,7 +620,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator==() */ -/*! \fn int QMap::size() const +/*! \fn template int QMap::size() const Returns the number of (key, value) pairs in the map. @@ -628,7 +628,7 @@ void QMapDataBase::freeData(QMapDataBase *d) */ /*! - \fn bool QMap::isEmpty() const + \fn template bool QMap::isEmpty() const Returns \c true if the map contains no items; otherwise returns false. @@ -636,7 +636,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa size() */ -/*! \fn void QMap::detach() +/*! \fn template void QMap::detach() \internal @@ -646,7 +646,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa isDetached() */ -/*! \fn bool QMap::isDetached() const +/*! \fn template bool QMap::isDetached() const \internal @@ -656,24 +656,24 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa detach() */ -/*! \fn void QMap::setSharable(bool sharable) +/*! \fn template void QMap::setSharable(bool sharable) \internal */ -/*! \fn bool QMap::isSharedWith(const QMap &other) const +/*! \fn template bool QMap::isSharedWith(const QMap &other) const \internal */ -/*! \fn void QMap::clear() +/*! \fn template void QMap::clear() Removes all items from the map. \sa remove() */ -/*! \fn int QMap::remove(const Key &key) +/*! \fn template int QMap::remove(const Key &key) Removes all the items that have the key \a key from the map. Returns the number of items removed which is usually 1 but will be @@ -683,7 +683,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa clear(), take(), QMultiMap::remove() */ -/*! \fn T QMap::take(const Key &key) +/*! \fn template T QMap::take(const Key &key) Removes the item with the key \a key from the map and returns the value associated with it. @@ -698,7 +698,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa remove() */ -/*! \fn bool QMap::contains(const Key &key) const +/*! \fn template bool QMap::contains(const Key &key) const Returns \c true if the map contains an item with key \a key; otherwise returns \c false. @@ -706,7 +706,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa count(), QMultiMap::contains() */ -/*! \fn const T QMap::value(const Key &key, const T &defaultValue) const +/*! \fn template const T QMap::value(const Key &key, const T &defaultValue) const Returns the value associated with the key \a key. @@ -719,7 +719,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa key(), values(), contains(), operator[]() */ -/*! \fn T &QMap::operator[](const Key &key) +/*! \fn template T &QMap::operator[](const Key &key) Returns the value associated with the key \a key as a modifiable reference. @@ -733,14 +733,14 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa insert(), value() */ -/*! \fn const T QMap::operator[](const Key &key) const +/*! \fn template const T QMap::operator[](const Key &key) const \overload Same as value(). */ -/*! \fn QList QMap::uniqueKeys() const +/*! \fn template QList QMap::uniqueKeys() const \since 4.2 Returns a list containing all the keys in the map in ascending @@ -751,7 +751,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa keys(), values() */ -/*! \fn QList QMap::keys() const +/*! \fn template QList QMap::keys() const Returns a list containing all the keys in the map in ascending order. Keys that occur multiple times in the map (because items @@ -766,7 +766,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa uniqueKeys(), values(), key() */ -/*! \fn QList QMap::keys(const T &value) const +/*! \fn template QList QMap::keys(const T &value) const \overload @@ -779,7 +779,7 @@ void QMapDataBase::freeData(QMapDataBase *d) */ /*! - \fn Key QMap::key(const T &value, const Key &defaultKey) const + \fn template Key QMap::key(const T &value, const Key &defaultKey) const \since 4.3 \overload @@ -795,7 +795,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa value(), keys() */ -/*! \fn QList QMap::values() const +/*! \fn template QList QMap::values() const Returns a list containing all the values in the map, in ascending order of their keys. If a key is associated with multiple values, @@ -805,7 +805,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa keys(), value() */ -/*! \fn QList QMap::values(const Key &key) const +/*! \fn template QList QMap::values(const Key &key) const \overload @@ -816,21 +816,21 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa count(), insertMulti() */ -/*! \fn int QMap::count(const Key &key) const +/*! \fn template int QMap::count(const Key &key) const Returns the number of items associated with key \a key. \sa contains(), insertMulti(), QMultiMap::count() */ -/*! \fn int QMap::count() const +/*! \fn template int QMap::count() const \overload Same as size(). */ -/*! \fn QMap::iterator QMap::begin() +/*! \fn template QMap::iterator QMap::begin() Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the map. @@ -838,12 +838,12 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa constBegin(), end() */ -/*! \fn QMap::const_iterator QMap::begin() const +/*! \fn template QMap::const_iterator QMap::begin() const \overload */ -/*! \fn QMap::const_iterator QMap::cbegin() const +/*! \fn template QMap::const_iterator QMap::cbegin() const \since 5.0 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item @@ -852,7 +852,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa begin(), cend() */ -/*! \fn QMap::const_iterator QMap::constBegin() const +/*! \fn template QMap::const_iterator QMap::constBegin() const Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the map. @@ -860,7 +860,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa begin(), constEnd() */ -/*! \fn QMap::key_iterator QMap::keyBegin() const +/*! \fn template QMap::key_iterator QMap::keyBegin() const \since 5.6 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first key @@ -869,7 +869,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa keyEnd(), firstKey() */ -/*! \fn QMap::iterator QMap::end() +/*! \fn template QMap::iterator QMap::end() Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the map. @@ -877,12 +877,12 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa begin(), constEnd() */ -/*! \fn QMap::const_iterator QMap::end() const +/*! \fn template QMap::const_iterator QMap::end() const \overload */ -/*! \fn QMap::const_iterator QMap::cend() const +/*! \fn template QMap::const_iterator QMap::cend() const \since 5.0 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary @@ -891,7 +891,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa cbegin(), end() */ -/*! \fn QMap::const_iterator QMap::constEnd() const +/*! \fn template QMap::const_iterator QMap::constEnd() const Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the map. @@ -899,7 +899,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa constBegin(), end() */ -/*! \fn QMap::key_iterator QMap::keyEnd() const +/*! \fn template QMap::key_iterator QMap::keyEnd() const \since 5.6 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary @@ -909,7 +909,7 @@ void QMapDataBase::freeData(QMapDataBase *d) */ -/*! \fn QMap::key_value_iterator QMap::keyValueBegin() +/*! \fn template QMap::key_value_iterator QMap::keyValueBegin() \since 5.10 Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first entry @@ -918,7 +918,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa keyValueEnd() */ -/*! \fn QMap::key_value_iterator QMap::keyValueEnd() +/*! \fn template QMap::key_value_iterator QMap::keyValueEnd() \since 5.10 Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary @@ -927,7 +927,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa keyValueBegin() */ -/*! \fn QMap::const_key_value_iterator QMap::keyValueBegin() const +/*! \fn template QMap::const_key_value_iterator QMap::keyValueBegin() const \since 5.10 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first entry @@ -936,7 +936,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa keyValueEnd() */ -/*! \fn QMap::const_key_value_iterator QMap::constKeyValueBegin() const +/*! \fn template QMap::const_key_value_iterator QMap::constKeyValueBegin() const \since 5.10 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first entry @@ -945,7 +945,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa keyValueBegin() */ -/*! \fn QMap::const_key_value_iterator QMap::keyValueEnd() const +/*! \fn template QMap::const_key_value_iterator QMap::keyValueEnd() const \since 5.10 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary @@ -954,7 +954,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa keyValueBegin() */ -/*! \fn QMap::const_key_value_iterator QMap::constKeyValueEnd() const +/*! \fn template QMap::const_key_value_iterator QMap::constKeyValueEnd() const \since 5.10 Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary @@ -963,7 +963,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa constKeyValueBegin() */ -/*! \fn const Key &QMap::firstKey() const +/*! \fn template const Key &QMap::firstKey() const \since 5.2 Returns a reference to the smallest key in the map. @@ -974,7 +974,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa lastKey(), first(), keyBegin(), isEmpty() */ -/*! \fn const Key &QMap::lastKey() const +/*! \fn template const Key &QMap::lastKey() const \since 5.2 Returns a reference to the largest key in the map. @@ -985,7 +985,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa firstKey(), last(), keyEnd(), isEmpty() */ -/*! \fn T &QMap::first() +/*! \fn template T &QMap::first() \since 5.2 Returns a reference to the first value in the map, that is the value mapped @@ -996,13 +996,13 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa last(), firstKey(), isEmpty() */ -/*! \fn const T &QMap::first() const +/*! \fn template const T &QMap::first() const \since 5.2 \overload */ -/*! \fn T &QMap::last() +/*! \fn template T &QMap::last() \since 5.2 Returns a reference to the last value in the map, that is the value mapped @@ -1013,13 +1013,13 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa first(), lastKey(), isEmpty() */ -/*! \fn const T &QMap::last() const +/*! \fn template const T &QMap::last() const \since 5.2 \overload */ -/*! \fn QMap::iterator QMap::erase(iterator pos) +/*! \fn template QMap::iterator QMap::erase(iterator pos) Removes the (key, value) pair pointed to by the iterator \a pos from the map, and returns an iterator to the next item in the @@ -1028,7 +1028,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa remove() */ -/*! \fn QMap::iterator QMap::find(const Key &key) +/*! \fn template QMap::iterator QMap::find(const Key &key) Returns an iterator pointing to the item with key \a key in the map. @@ -1047,12 +1047,12 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa constFind(), value(), values(), lowerBound(), upperBound(), QMultiMap::find() */ -/*! \fn QMap::const_iterator QMap::find(const Key &key) const +/*! \fn template QMap::const_iterator QMap::find(const Key &key) const \overload */ -/*! \fn QMap::const_iterator QMap::constFind(const Key &key) const +/*! \fn template QMap::const_iterator QMap::constFind(const Key &key) const \since 4.1 Returns an const iterator pointing to the item with key \a key in the @@ -1064,7 +1064,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa find(), QMultiMap::constFind() */ -/*! \fn QMap::iterator QMap::lowerBound(const Key &key) +/*! \fn template QMap::iterator QMap::lowerBound(const Key &key) Returns an iterator pointing to the first item with key \a key in the map. If the map contains no item with key \a key, the @@ -1085,12 +1085,12 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa upperBound(), find() */ -/*! \fn QMap::const_iterator QMap::lowerBound(const Key &key) const +/*! \fn template QMap::const_iterator QMap::lowerBound(const Key &key) const \overload */ -/*! \fn QMap::iterator QMap::upperBound(const Key &key) +/*! \fn template QMap::iterator QMap::upperBound(const Key &key) Returns an iterator pointing to the item that immediately follows the last item with key \a key in the map. If the map contains no @@ -1103,12 +1103,12 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa lowerBound(), find() */ -/*! \fn QMap::const_iterator QMap::upperBound(const Key &key) const +/*! \fn template QMap::const_iterator QMap::upperBound(const Key &key) const \overload */ -/*! \fn QMap::iterator QMap::insert(const Key &key, const T &value) +/*! \fn template QMap::iterator QMap::insert(const Key &key, const T &value) Inserts a new item with the key \a key and a value of \a value. @@ -1121,7 +1121,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa insertMulti() */ -/*! \fn QMap::iterator QMap::insert(const_iterator pos, const Key &key, const T &value) +/*! \fn template QMap::iterator QMap::insert(const_iterator pos, const Key &key, const T &value) \overload \since 5.1 Inserts a new item with the key \a key and value \a value and with hint \a pos @@ -1150,7 +1150,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa insertMulti() */ -/*! \fn QMap::iterator QMap::insertMulti(const Key &key, const T &value) +/*! \fn template QMap::iterator QMap::insertMulti(const Key &key, const T &value) Inserts a new item with the key \a key and a value of \a value. @@ -1162,7 +1162,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa insert(), values() */ -/*! \fn QMap::iterator QMap::insertMulti(const_iterator pos, const Key &key, const T &value) +/*! \fn template QMap::iterator QMap::insertMulti(const_iterator pos, const Key &key, const T &value) \overload \since 5.1 Inserts a new item with the key \a key and value \a value and with hint \a pos @@ -1182,7 +1182,7 @@ void QMapDataBase::freeData(QMapDataBase *d) */ -/*! \fn QMap &QMap::unite(const QMap &other) +/*! \fn template QMap &QMap::unite(const QMap &other) Inserts all the items in the \a other map into this map. If a key is common to both maps, the resulting map will contain the @@ -1193,12 +1193,12 @@ void QMapDataBase::freeData(QMapDataBase *d) /*! \typedef QMap::Iterator - Qt-style synonym for QMap::iterator. + Qt-style synonym for QMap::iterator. */ /*! \typedef QMap::ConstIterator - Qt-style synonym for QMap::const_iterator. + Qt-style synonym for QMap::const_iterator. */ /*! \typedef QMap::difference_type @@ -1222,7 +1222,7 @@ void QMapDataBase::freeData(QMapDataBase *d) */ /*! - \fn bool QMap::empty() const + \fn template bool QMap::empty() const This function is provided for STL compatibility. It is equivalent to isEmpty(), returning true if the map is empty; otherwise @@ -1230,14 +1230,14 @@ void QMapDataBase::freeData(QMapDataBase *d) */ /*! - \fn QPair QMap::equal_range(const Key &key) + \fn template QPair QMap::equal_range(const Key &key) Returns a pair of iterators delimiting the range of values \c{[first, second)}, that are stored under \a key. */ /*! - \fn QPair QMap::equal_range(const Key &key) const + \fn template QPair QMap::equal_range(const Key &key) const \overload \since 5.6 */ @@ -1339,7 +1339,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \internal */ -/*! \fn QMap::iterator::iterator() +/*! \fn template QMap::iterator::iterator() Constructs an uninitialized iterator. @@ -1350,12 +1350,12 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa QMap::begin(), QMap::end() */ -/*! \fn QMap::iterator::iterator(Node *) +/*! \fn template QMap::iterator::iterator(Node *) \internal */ -/*! \fn const Key &QMap::iterator::key() const +/*! \fn template const Key &QMap::iterator::key() const Returns the current item's key as a const reference. @@ -1366,7 +1366,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa value() */ -/*! \fn T &QMap::iterator::value() const +/*! \fn template T &QMap::iterator::value() const Returns a modifiable reference to the current item's value. @@ -1378,7 +1378,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa key(), operator*() */ -/*! \fn T &QMap::iterator::operator*() const +/*! \fn template T &QMap::iterator::operator*() const Returns a modifiable reference to the current item's value. @@ -1387,7 +1387,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa key() */ -/*! \fn T *QMap::iterator::operator->() const +/*! \fn template T *QMap::iterator::operator->() const Returns a pointer to the current item's value. @@ -1395,8 +1395,8 @@ void QMapDataBase::freeData(QMapDataBase *d) */ /*! - \fn bool QMap::iterator::operator==(const iterator &other) const - \fn bool QMap::iterator::operator==(const const_iterator &other) const + \fn template bool QMap::iterator::operator==(const iterator &other) const + \fn template bool QMap::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. @@ -1405,8 +1405,8 @@ void QMapDataBase::freeData(QMapDataBase *d) */ /*! - \fn bool QMap::iterator::operator!=(const iterator &other) const - \fn bool QMap::iterator::operator!=(const const_iterator &other) const + \fn template bool QMap::iterator::operator!=(const iterator &other) const + \fn template bool QMap::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. @@ -1414,7 +1414,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator==() */ -/*! \fn QMap::iterator QMap::iterator::operator++() +/*! \fn template QMap::iterator QMap::iterator::operator++() The prefix ++ operator (\c{++i}) advances the iterator to the next item in the map and returns an iterator to the new current @@ -1425,7 +1425,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator--() */ -/*! \fn QMap::iterator QMap::iterator::operator++(int) +/*! \fn template QMap::iterator QMap::iterator::operator++(int) \overload @@ -1434,7 +1434,7 @@ void QMapDataBase::freeData(QMapDataBase *d) current item. */ -/*! \fn QMap::iterator QMap::iterator::operator--() +/*! \fn template QMap::iterator QMap::iterator::operator--() The prefix -- operator (\c{--i}) makes the preceding item current and returns an iterator pointing to the new current item. @@ -1445,7 +1445,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator++() */ -/*! \fn QMap::iterator QMap::iterator::operator--(int) +/*! \fn template QMap::iterator QMap::iterator::operator--(int) \overload @@ -1454,7 +1454,7 @@ void QMapDataBase::freeData(QMapDataBase *d) current item. */ -/*! \fn QMap::iterator QMap::iterator::operator+(int j) const +/*! \fn template QMap::iterator QMap::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.) @@ -1465,7 +1465,7 @@ void QMapDataBase::freeData(QMapDataBase *d) */ -/*! \fn QMap::iterator QMap::iterator::operator-(int j) const +/*! \fn template QMap::iterator QMap::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.) @@ -1475,7 +1475,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator+() */ -/*! \fn QMap::iterator &QMap::iterator::operator+=(int j) +/*! \fn template QMap::iterator &QMap::iterator::operator+=(int j) Advances the iterator by \a j items. (If \a j is negative, the iterator goes backward.) @@ -1483,7 +1483,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator-=(), operator+() */ -/*! \fn QMap::iterator &QMap::iterator::operator-=(int j) +/*! \fn template QMap::iterator &QMap::iterator::operator-=(int j) Makes the iterator go back by \a j items. (If \a j is negative, the iterator goes forward.) @@ -1562,7 +1562,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \internal */ -/*! \fn QMap::const_iterator::const_iterator() +/*! \fn template QMap::const_iterator::const_iterator() Constructs an uninitialized iterator. @@ -1573,31 +1573,31 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa QMap::constBegin(), QMap::constEnd() */ -/*! \fn QMap::const_iterator::const_iterator(const Node *) +/*! \fn template QMap::const_iterator::const_iterator(const Node *) \internal */ -/*! \fn QMap::const_iterator::const_iterator(const iterator &other) +/*! \fn template QMap::const_iterator::const_iterator(const iterator &other) Constructs a copy of \a other. */ -/*! \fn const Key &QMap::const_iterator::key() const +/*! \fn template const Key &QMap::const_iterator::key() const Returns the current item's key. \sa value() */ -/*! \fn const T &QMap::const_iterator::value() const +/*! \fn template const T &QMap::const_iterator::value() const Returns the current item's value. \sa key(), operator*() */ -/*! \fn const T &QMap::const_iterator::operator*() const +/*! \fn template const T &QMap::const_iterator::operator*() const Returns the current item's value. @@ -1606,14 +1606,14 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa key() */ -/*! \fn const T *QMap::const_iterator::operator->() const +/*! \fn template const T *QMap::const_iterator::operator->() const Returns a pointer to the current item's value. \sa value() */ -/*! \fn bool QMap::const_iterator::operator==(const const_iterator &other) const +/*! \fn template bool QMap::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. @@ -1621,7 +1621,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator!=() */ -/*! \fn bool QMap::const_iterator::operator!=(const const_iterator &other) const +/*! \fn template bool QMap::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. @@ -1629,7 +1629,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator==() */ -/*! \fn QMap::const_iterator QMap::const_iterator::operator++() +/*! \fn template QMap::const_iterator QMap::const_iterator::operator++() The prefix ++ operator (\c{++i}) advances the iterator to the next item in the map and returns an iterator to the new current @@ -1640,7 +1640,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator--() */ -/*! \fn QMap::const_iterator QMap::const_iterator::operator++(int) +/*! \fn template QMap::const_iterator QMap::const_iterator::operator++(int) \overload @@ -1649,7 +1649,7 @@ void QMapDataBase::freeData(QMapDataBase *d) current item. */ -/*! \fn QMap::const_iterator &QMap::const_iterator::operator--() +/*! \fn template QMap::const_iterator &QMap::const_iterator::operator--() The prefix -- operator (\c{--i}) makes the preceding item current and returns an iterator pointing to the new current item. @@ -1660,7 +1660,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator++() */ -/*! \fn QMap::const_iterator QMap::const_iterator::operator--(int) +/*! \fn template QMap::const_iterator QMap::const_iterator::operator--(int) \overload @@ -1669,7 +1669,7 @@ void QMapDataBase::freeData(QMapDataBase *d) current item. */ -/*! \fn QMap::const_iterator QMap::const_iterator::operator+(int j) const +/*! \fn template QMap::const_iterator QMap::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.) @@ -1679,7 +1679,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator-() */ -/*! \fn QMap::const_iterator QMap::const_iterator::operator-(int j) const +/*! \fn template QMap::const_iterator QMap::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.) @@ -1689,7 +1689,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator+() */ -/*! \fn QMap::const_iterator &QMap::const_iterator::operator+=(int j) +/*! \fn template QMap::const_iterator &QMap::const_iterator::operator+=(int j) Advances the iterator by \a j items. (If \a j is negative, the iterator goes backward.) @@ -1699,7 +1699,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator-=(), operator+() */ -/*! \fn QMap::const_iterator &QMap::const_iterator::operator-=(int j) +/*! \fn template QMap::const_iterator &QMap::const_iterator::operator-=(int j) Makes the iterator go back by \a j items. (If \a j is negative, the iterator goes forward.) @@ -1766,17 +1766,17 @@ void QMapDataBase::freeData(QMapDataBase *d) \internal */ -/*! \fn const T &QMap::key_iterator::operator*() const +/*! \fn template const T &QMap::key_iterator::operator*() const Returns the current item's key. */ -/*! \fn const T *QMap::key_iterator::operator->() const +/*! \fn template const T *QMap::key_iterator::operator->() const Returns a pointer to the current item's key. */ -/*! \fn bool QMap::key_iterator::operator==(key_iterator other) const +/*! \fn template bool QMap::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. @@ -1784,7 +1784,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator!=() */ -/*! \fn bool QMap::key_iterator::operator!=(key_iterator other) const +/*! \fn template bool QMap::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. @@ -1793,7 +1793,7 @@ void QMapDataBase::freeData(QMapDataBase *d) */ /*! - \fn QMap::key_iterator &QMap::key_iterator::operator++() + \fn template QMap::key_iterator &QMap::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 @@ -1804,7 +1804,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator--() */ -/*! \fn QMap::key_iterator QMap::key_iterator::operator++(int) +/*! \fn template QMap::key_iterator QMap::key_iterator::operator++(int) \overload @@ -1813,7 +1813,7 @@ void QMapDataBase::freeData(QMapDataBase *d) item. */ -/*! \fn QMap::key_iterator &QMap::key_iterator::operator--() +/*! \fn template QMap::key_iterator &QMap::key_iterator::operator--() The prefix -- operator (\c{--i}) makes the preceding item current and returns an iterator pointing to the new current item. @@ -1824,7 +1824,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator++() */ -/*! \fn QMap::key_iterator QMap::key_iterator::operator--(int) +/*! \fn template QMap::key_iterator QMap::key_iterator::operator--(int) \overload @@ -1833,10 +1833,22 @@ void QMapDataBase::freeData(QMapDataBase *d) item. */ -/*! \fn const_iterator QMap::key_iterator::base() const +/*! \fn template const_iterator QMap::key_iterator::base() const Returns the underlying const_iterator this key_iterator is based on. */ +/*! \typedef QMap::const_key_value_iterator + \inmodule QtCore + \since 5.10 + \brief The QMap::const_key_value_iterator typedef provides an STL-style iterator for QMap and QMultiMap. + + QMap::const_key_value_iterator is essentially the same as QMap::const_iterator + with the difference that operator*() returns a key/value pair instead of a + value. + + \sa QKeyValueIterator +*/ + /*! \typedef QMap::key_value_iterator \inmodule QtCore \since 5.10 @@ -1849,7 +1861,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa QKeyValueIterator */ -/*! \fn QDataStream &operator<<(QDataStream &out, const QMap &map) +/*! \fn template QDataStream &operator<<(QDataStream &out, const QMap &map) \relates QMap Writes the map \a map to stream \a out. @@ -1860,7 +1872,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa{Serializing Qt Data Types}{Format of the QDataStream operators} */ -/*! \fn QDataStream &operator>>(QDataStream &in, QMap &map) +/*! \fn template QDataStream &operator>>(QDataStream &in, QMap &map) \relates QMap Reads a map from stream \a in into \a map. @@ -1926,12 +1938,12 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa QMap, QMapIterator, QMutableMapIterator, QMultiHash */ -/*! \fn QMultiMap::QMultiMap() +/*! \fn template QMultiMap::QMultiMap() Constructs an empty map. */ -/*! \fn QMultiMap::QMultiMap(std::initializer_list > list) +/*! \fn template QMultiMap::QMultiMap(std::initializer_list > list) \since 5.1 Constructs a multi-map with a copy of each of the elements in the @@ -1941,7 +1953,7 @@ void QMapDataBase::freeData(QMapDataBase *d) compiled in C++11 mode. */ -/*! \fn QMultiMap::QMultiMap(const QMap &other) +/*! \fn template QMultiMap::QMultiMap(const QMap &other) Constructs a copy of \a other (which can be a QMap or a QMultiMap). @@ -1949,7 +1961,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa operator=() */ -/*! \fn QMultiMap::iterator QMultiMap::replace(const Key &key, const T &value) +/*! \fn template QMultiMap::iterator QMultiMap::replace(const Key &key, const T &value) Inserts a new item with the key \a key and a value of \a value. @@ -1962,7 +1974,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa insert() */ -/*! \fn QMultiMap::iterator QMultiMap::insert(const Key &key, const T &value) +/*! \fn template QMultiMap::iterator QMultiMap::insert(const Key &key, const T &value) Inserts a new item with the key \a key and a value of \a value. @@ -1974,7 +1986,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa replace() */ -/*! \fn QMultiMap::iterator QMultiMap::insert(QMap::const_iterator pos, const Key &key, const T &value) +/*! \fn template typename QMap::iterator QMultiMap::insert(typename QMap::const_iterator pos, const Key &key, const T &value) \since 5.1 Inserts a new item with the key \a key and value \a value and with hint \a pos @@ -1991,7 +2003,7 @@ void QMapDataBase::freeData(QMapDataBase *d) crash but there is also a risk that it will silently corrupt both the map and the \a pos map. */ -/*! \fn QMultiMap &QMultiMap::operator+=(const QMultiMap &other) +/*! \fn template QMultiMap &QMultiMap::operator+=(const QMultiMap &other) Inserts all the items in the \a other map into this map and returns a reference to this map. @@ -1999,7 +2011,7 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa insert(), operator+() */ -/*! \fn QMultiMap QMultiMap::operator+(const QMultiMap &other) const +/*! \fn template QMultiMap QMultiMap::operator+(const QMultiMap &other) const Returns a map that contains all the items in this map in addition to all the items in \a other. If a key is common to both @@ -2009,7 +2021,7 @@ void QMapDataBase::freeData(QMapDataBase *d) */ /*! - \fn bool QMultiMap::contains(const Key &key, const T &value) const + \fn template bool QMultiMap::contains(const Key &key, const T &value) const \since 4.3 Returns \c true if the map contains an item with key \a key and @@ -2019,7 +2031,7 @@ void QMapDataBase::freeData(QMapDataBase *d) */ /*! - \fn int QMultiMap::remove(const Key &key, const T &value) + \fn template int QMultiMap::remove(const Key &key, const T &value) \since 4.3 Removes all the items that have the key \a key and the value \a @@ -2029,7 +2041,7 @@ void QMapDataBase::freeData(QMapDataBase *d) */ /*! - \fn int QMultiMap::count(const Key &key, const T &value) const + \fn template int QMultiMap::count(const Key &key, const T &value) const \since 4.3 Returns the number of items with key \a key and value \a value. @@ -2038,7 +2050,7 @@ void QMapDataBase::freeData(QMapDataBase *d) */ /*! - \fn typename QMap::iterator QMultiMap::find(const Key &key, const T &value) + \fn template typename QMap::iterator QMultiMap::find(const Key &key, const T &value) \since 4.3 Returns an iterator pointing to the item with key \a key and @@ -2054,7 +2066,7 @@ void QMapDataBase::freeData(QMapDataBase *d) */ /*! - \fn typename QMap::const_iterator QMultiMap::find(const Key &key, const T &value) const + \fn template typename QMap::const_iterator QMultiMap::find(const Key &key, const T &value) const \since 4.3 \overload @@ -2071,7 +2083,7 @@ void QMapDataBase::freeData(QMapDataBase *d) */ /*! - \fn typename QMap::const_iterator QMultiMap::constFind(const Key &key, const T &value) const + \fn template typename QMap::const_iterator QMultiMap::constFind(const Key &key, const T &value) const \since 4.3 Returns an iterator pointing to the item with key \a key and the -- cgit v1.2.3