summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qhash.cpp
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2021-11-02 16:57:11 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2021-11-03 07:41:56 +0000
commit29f86b5698fa22d5675777ae91e36be7dc530844 (patch)
tree09f106c26967456baefe53aa31adeabc493c1efe /src/corelib/tools/qhash.cpp
parente3a5bd3e55916618a0384894d44c70f82870210d (diff)
QMultiHash: Add forgotten documentation
After the split of QHash and QMultiHash this function was not documented since it was previously inherited from QHash. As a drive-by also update 'int' to 'qsizetype' in docs Pick-to: 6.2 Change-Id: I5d168886f13c2cdd4482038e66d0cf218789c847 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/tools/qhash.cpp')
-rw-r--r--src/corelib/tools/qhash.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index e8ae490490..6d7ed95aca 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -1703,7 +1703,7 @@ size_t qHash(long double key, size_t seed) noexcept
\sa operator==()
*/
-/*! \fn template <class Key, class T> int QHash<Key, T>::size() const
+/*! \fn template <class Key, class T> qsizetype QHash<Key, T>::size() const
Returns the number of items in the hash.
@@ -1718,7 +1718,7 @@ size_t qHash(long double key, size_t seed) noexcept
\sa size()
*/
-/*! \fn template <class Key, class T> int QHash<Key, T>::capacity() const
+/*! \fn template <class Key, class T> qsizetype QHash<Key, T>::capacity() const
Returns the number of buckets in the QHash's internal hash table.
@@ -1946,14 +1946,14 @@ size_t qHash(long double key, size_t seed) noexcept
by value.
*/
-/*! \fn template <class Key, class T> int QHash<Key, T>::count(const Key &key) const
+/*! \fn template <class Key, class T> qsizetype QHash<Key, T>::count(const Key &key) const
Returns the number of items associated with the \a key.
\sa contains()
*/
-/*! \fn template <class Key, class T> int QHash<Key, T>::count() const
+/*! \fn template <class Key, class T> qsizetype QHash<Key, T>::count() const
\overload
@@ -2964,7 +2964,17 @@ size_t qHash(long double key, size_t seed) noexcept
*/
/*!
- \fn template <class Key, class T> int QMultiHash<Key, T>::remove(const Key &key, const T &value)
+ \fn template <class Key, class T> qsizetype QMultiHash<Key, T>::remove(const Key &key)
+ \since 4.3
+
+ Removes all the items that have the \a key from the hash.
+ Returns the number of items removed.
+
+ \sa remove()
+*/
+
+/*!
+ \fn template <class Key, class T> qsizetype QMultiHash<Key, T>::remove(const Key &key, const T &value)
\since 4.3
Removes all the items that have the \a key and the value \a
@@ -3056,7 +3066,7 @@ size_t qHash(long double key, size_t seed) noexcept
*/
/*!
- \fn template <class Key, class T> int QMultiHash<Key, T>::count(const Key &key, const T &value) const
+ \fn template <class Key, class T> qsizetype QMultiHash<Key, T>::count(const Key &key, const T &value) const
\since 4.3
Returns the number of items with the \a key and \a value.