summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qmap.qdoc
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2024-02-06 10:38:55 +0100
committerMarc Mutz <marc.mutz@qt.io>2024-02-09 20:33:05 +0000
commite1f45ad8187947e243c8247c5cbac2d884d68d55 (patch)
tree57efaa5f185e4363afac84d3390a152b6f9daabe /src/corelib/tools/qmap.qdoc
parent3a2d8c5828efee9f182c260f55720d3bb6152893 (diff)
QMap: add missing qHash() overload
Found in API review, but not deemed important enough to still get into 6.7. Not implementing it for QMultiMap, because there we need to mod out order of equivalent elements. The GHS compiler acted up and tried to compile the noexcept specification, hitting non-existing qHash(QVariant) for QVariantMap and producing a hard error instead of SFINAE'ing out. As a work-around, establish an artificial SFINAE-friendly context, but only for that compiler. [ChangeLog][QtCore][QMap/QHash] Added qHash() overload for QMap. Change-Id: Ia7dbf488e8e5490962118e40581b7c4cc8ed95e5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/tools/qmap.qdoc')
-rw-r--r--src/corelib/tools/qmap.qdoc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/tools/qmap.qdoc b/src/corelib/tools/qmap.qdoc
index 9b5a8588cf..d4779ba28c 100644
--- a/src/corelib/tools/qmap.qdoc
+++ b/src/corelib/tools/qmap.qdoc
@@ -1389,3 +1389,12 @@
Returns the number of elements removed, if any.
*/
+
+/*!
+ \fn template <class Key, class T> QMap<Key, T>::qHash(const QMap &key, size_t seed)
+ \since 6.8
+
+ Returns the hash value for \a key, using \a seed to seed the calculation.
+
+ Types \c Key and \c T must be supported by qHash().
+*/