summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qhash.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-02-16 13:42:19 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-05-08 01:36:32 +0200
commitb4a05b123343f0412973f0848bf8443d1fbc046b (patch)
treebd5e52995d07b7255f3c76b531f60b092ac618a5 /src/corelib/tools/qhash.cpp
parent657fa0462d552110e2ba14bcac46275e6066993f (diff)
Provide qHash for all C++ fundamental types
Except for (void and) bool, which we may not want to have to avoid accidental implicit conversions. Drive-by, rearrange qHash overloads to C++ types first, and then Qt ones. Change-Id: I9c4ecef5f28568d35ca52e339583851ce53b3bae Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/tools/qhash.cpp')
-rw-r--r--src/corelib/tools/qhash.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 97dda58748..bf5031523d 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -769,6 +769,34 @@ uint qt_hash(QStringView key, uint chained) noexcept
Returns the hash value for the \a key, using \a seed to seed the calculation.
*/
+/*! \fn size_t qHash(char8_t key, size_t seed = 0)
+ \relates QHash
+ \since 6.0
+
+ Returns the hash value for the \a key, using \a seed to seed the calculation.
+*/
+
+/*! \fn size_t qHash(char16_t key, size_t seed = 0)
+ \relates QHash
+ \since 6.0
+
+ Returns the hash value for the \a key, using \a seed to seed the calculation.
+*/
+
+/*! \fn size_t qHash(char32_t key, size_t seed = 0)
+ \relates QHash
+ \since 6.0
+
+ Returns the hash value for the \a key, using \a seed to seed the calculation.
+*/
+
+/*! \fn size_t qHash(wchar_t key, size_t seed = 0)
+ \relates QHash
+ \since 6.0
+
+ Returns the hash value for the \a key, using \a seed to seed the calculation.
+*/
+
/*! \fn size_t qHash(float key, size_t seed) noexcept
\relates QHash
\since 5.3
@@ -870,6 +898,13 @@ size_t qHash(long double key, size_t seed) noexcept
Returns the hash value for the \a key, using \a seed to seed the calculation.
*/
+/*! \fn template <class T> size_t qHash(std::nullptr_t key, size_t seed = 0)
+ \relates QHash
+ \since 6.0
+
+ Returns the hash value for the \a key, using \a seed to seed the calculation.
+*/
+
/*!
\class QHash
\inmodule QtCore