From 29f86b5698fa22d5675777ae91e36be7dc530844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Tue, 2 Nov 2021 16:57:11 +0100 Subject: [PATCH] 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 --- src/corelib/tools/qhash.cpp | 22 ++++++++++++++++------ 1 file 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 int QHash::size() const +/*! \fn template qsizetype QHash::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 int QHash::capacity() const +/*! \fn template qsizetype QHash::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 int QHash::count(const Key &key) const +/*! \fn template qsizetype QHash::count(const Key &key) const Returns the number of items associated with the \a key. \sa contains() */ -/*! \fn template int QHash::count() const +/*! \fn template qsizetype QHash::count() const \overload @@ -2964,7 +2964,17 @@ size_t qHash(long double key, size_t seed) noexcept */ /*! - \fn template int QMultiHash::remove(const Key &key, const T &value) + \fn template qsizetype QMultiHash::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 qsizetype QMultiHash::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 int QMultiHash::count(const Key &key, const T &value) const + \fn template qsizetype QMultiHash::count(const Key &key, const T &value) const \since 4.3 Returns the number of items with the \a key and \a value.