diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-09-25 15:21:48 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-09-28 07:07:56 +0200 |
commit | 36df66591aa24c575f5da2851a7f265d9f6f2fa8 (patch) | |
tree | eaa605fa2bbb79e6d2e9dd47cfcba8241b036e02 /src/corelib/tools | |
parent | 7083ddb5822e4b03b8e4098aeab1ca606940f7f0 (diff) |
Fix some qdoc warnings from QHash and QMultiHash
It's no longer possible to decrement an iterator, and the class uses
qsizetype, not int for sizes.
Fix incorrect function prototypes in the documentation, and remove
documentation for functions/overloads that don't exist.
QMultiHash doesn't have Java style iterators (not a new issue in
Qt 6), so remove the references to QMultiHashIterator.
Change-Id: I149b4620963f2087f3f66bb70a9c97b292a35378
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qhash.cpp | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 7c58be0f84..b73e29594d 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -1422,7 +1422,7 @@ size_t qHash(long double key, size_t seed) noexcept */ -/*! \fn template <class Key, class T> void QHash<Key, T>::reserve(int size) +/*! \fn template <class Key, class T> void QHash<Key, T>::reserve(qsizetype size) Ensures that the QHash's internal hash table has space to store at least \a size items without having to grow the hash table. @@ -1769,10 +1769,6 @@ size_t qHash(long double key, size_t seed) noexcept \sa remove(), take(), find() */ -/*! \fn template <class Key, class T> QHash<Key, T>::iterator QHash<Key, T>::erase(iterator pos) - \overload -*/ - /*! \fn template <class Key, class T> QHash<Key, T>::iterator QHash<Key, T>::find(const Key &key) Returns an iterator pointing to the item with the \a key in the @@ -1818,8 +1814,8 @@ size_t qHash(long double key, size_t seed) noexcept */ /*! - \fn template <typename T> template <typename ...Args> QHash<Key, T>::iterator QHash<Key, T>::emplace(const Key &key, Args&&... args) - \fn template <typename T> template <typename ...Args> QHash<Key, T>::iterator QHash<Key, T>::emplace(Key &&key, Args&&... args) + \fn template <class Key, class T> template <typename ...Args> QHash<Key, T>::iterator QHash<Key, T>::emplace(const Key &key, Args&&... args) + \fn template <class Key, class T> template <typename ...Args> QHash<Key, T>::iterator QHash<Key, T>::emplace(Key &&key, Args&&... args) Inserts a new element into the container. This new element is constructed in-place using \a args as the arguments for its @@ -2240,8 +2236,6 @@ size_t qHash(long double key, size_t seed) noexcept item. Calling this function on QHash::end() leads to undefined results. - - \sa operator--() */ /*! \fn template <class Key, class T> QHash<Key, T>::const_iterator QHash<Key, T>::const_iterator::operator++(int) @@ -2325,7 +2319,6 @@ size_t qHash(long double key, size_t seed) noexcept Calling this function on QHash::keyEnd() leads to undefined results. - \sa operator--() */ /*! \fn template <class Key, class T> QHash<Key, T>::key_iterator QHash<Key, T>::key_iterator::operator++(int) @@ -2466,8 +2459,6 @@ size_t qHash(long double key, size_t seed) noexcept Constructs a copy of \a other (which can be a QHash or a QMultiHash). - - \sa operator=() */ /*! \fn template <class Key, class T> template <class InputIterator> QMultiHash<Key, T>::QMultiHash(InputIterator begin, InputIterator end) @@ -2507,8 +2498,8 @@ size_t qHash(long double key, size_t seed) noexcept */ /*! - \fn template <typename T> template <typename ...Args> QMultiHash<Key, T>::iterator QMultiHash<Key, T>::emplace(const Key &key, Args&&... args) - \fn template <typename T> template <typename ...Args> QMultiHash<Key, T>::iterator QMultiHash<Key, T>::emplace(Key &&key, Args&&... args) + \fn template <class Key, class T> template <typename ...Args> QMultiHash<Key, T>::iterator QMultiHash<Key, T>::emplace(const Key &key, Args&&... args) + \fn template <class Key, class T> template <typename ...Args> QMultiHash<Key, T>::iterator QMultiHash<Key, T>::emplace(Key &&key, Args&&... args) Inserts a new element into the container. This new element is constructed in-place using \a args as the arguments for its @@ -2525,8 +2516,8 @@ size_t qHash(long double key, size_t seed) noexcept */ /*! - \fn template <typename T> template <typename ...Args> QMultiHash<Key, T>::iterator QMultiHash<Key, T>::emplaceReplace(const Key &key, Args&&... args) - \fn template <typename T> template <typename ...Args> QMultiHash<Key, T>::iterator QMultiHash<Key, T>::emplaceReplace(Key &&key, Args&&... args) + \fn template <class Key, class T> template <typename ...Args> QMultiHash<Key, T>::iterator QMultiHash<Key, T>::emplaceReplace(const Key &key, Args&&... args) + \fn template <class Key, class T> template <typename ...Args> QMultiHash<Key, T>::iterator QMultiHash<Key, T>::emplaceReplace(Key &&key, Args&&... args) Inserts a new element into the container. This new element is constructed in-place using \a args as the arguments for its @@ -3084,7 +3075,7 @@ size_t qHash(long double key, size_t seed) noexcept while iterators are active on that container. For more information, read \l{Implicit sharing iterator problem}. - \sa QMultiHash::iterator, QMultiHashIterator + \sa QMultiHash::iterator */ /*! \fn template <class Key, class T> QMultiHash<Key, T>::const_iterator::const_iterator() @@ -3157,8 +3148,6 @@ size_t qHash(long double key, size_t seed) noexcept item. Calling this function on QMultiHash::end() leads to undefined results. - - \sa operator--() */ /*! \fn template <class Key, class T> QMultiHash<Key, T>::const_iterator QMultiHash<Key, T>::const_iterator::operator++(int) @@ -3241,8 +3230,6 @@ size_t qHash(long double key, size_t seed) noexcept item. Calling this function on QMultiHash::keyEnd() leads to undefined results. - - \sa operator--() */ /*! \fn template <class Key, class T> QMultiHash<Key, T>::key_iterator QMultiHash<Key, T>::key_iterator::operator++(int) |