From fad01d6a045bc648b4a980c63db0e3c560f93ec6 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 10 Oct 2024 13:21:18 +0200 Subject: [PATCH] [docs] Add missing qHash(Enum) documentation Amends fb4bc5fa262336504e0f28603658bb2572796ce5. Pick-to: 6.5 Change-Id: I1097b8313806c5f9272bcbfced21e66036e45763 Reviewed-by: Mate Barany Reviewed-by: Juha Vuolle (cherry picked from commit 55a6c77d77dab4d877e1c4bb9d9b828b005604eb) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/tools/qhash.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 4bbfa6bbefb..0846d144bd1 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -1369,6 +1369,17 @@ size_t qHash(long double key, size_t seed) noexcept } } +/*! + \fn template , bool> = true> size_t qHash(Enum key, size_t seed) + \since 6.5 + \qhashbuiltin + + \note Prior to Qt 6.5, unscoped enums relied on the integer overloads of this + function due to implicit conversion to their underlying integer types. + For scoped enums, you had to implement an overload yourself. This is still the + backwards-compatible fix to remain compatible with older Qt versions. +*/ + /*! \fn size_t qHash(const QChar key, size_t seed = 0) \since 5.0 \qhashold{QHash}