From baeda090d3fd51cf73b10f4ba78c1cf5955c4471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Wed, 5 Feb 2025 15:46:52 +0100 Subject: [PATCH] QMultiHash: fix/update class description documentation It no longer inherits QHash, so drop the references to this. And remove an extra 'and'. Change-Id: I5c19f7793571fe04f93e0ede37d280d215d95dfc Reviewed-by: Marc Mutz (cherry picked from commit dc8055c9149c0ceb42b4313fb7af0a5b78fe1c16) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 1aef8b9057e54de34b7ad413b5df1c023814f3ce) --- src/corelib/tools/qhash.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 0846d144bd..3b20d35470 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -2825,7 +2825,7 @@ size_t qHash(long double key, size_t seed) noexcept /*! \class QMultiHash \inmodule QtCore - \brief The QMultiHash class is a convenience QHash subclass that provides multi-valued hashes. + \brief The QMultiHash class provides a multi-valued hash table. \ingroup tools \ingroup shared @@ -2833,10 +2833,7 @@ size_t qHash(long double key, size_t seed) noexcept \reentrant QMultiHash\ is one of Qt's generic \l{container classes}. - It inherits QHash and extends it with a few convenience functions - that make it more suitable than QHash for storing multi-valued - hashes. A multi-valued hash is a hash that allows multiple values - with the same key. + It provides a hash table that allows multiple values for the same key. QMultiHash mostly mirrors QHash's API. For example, you can use isEmpty() to test whether the hash is empty, and you can traverse a QMultiHash using @@ -2846,7 +2843,7 @@ size_t qHash(long double key, size_t seed) noexcept QHash::insert(). It also provides convenient operator+() and operator+=(). - Unlike QMultiMap, QMultiHash does not provide and ordering of the + Unlike QMultiMap, QMultiHash does not provide ordering of the inserted items. The only guarantee is that items that share the same key will appear consecutively, from the most recently to the least recently inserted value.