From 5c8910adfd613382e97c5517e85e9088a2abbe3e Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 12 Sep 2023 15:50:01 +0200 Subject: [PATCH] moc: make qHash(SubArray) accept a seed This prevents the use of the one-arg-to-two-arg adapter template which we'd remove rather sooner than later, because it's causing all sorts of problems, but probably can't, until Qt 7. Pick-to: 6.6 Task-number: QTBUG-116074 Change-Id: I5907da0dc8c01b636d16dcc01e9c808ab9a85081 Reviewed-by: Fabian Kosmale --- src/tools/moc/symbols.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/moc/symbols.h b/src/tools/moc/symbols.h index a0c83de5750..869f7c793f5 100644 --- a/src/tools/moc/symbols.h +++ b/src/tools/moc/symbols.h @@ -7,7 +7,7 @@ #include "token.h" #include -#include +#include #include #include #include @@ -37,9 +37,9 @@ struct SubArray } }; -inline size_t qHash(const SubArray &key) +inline size_t qHash(const SubArray &key, size_t seed = 0) { - return qHash(QLatin1StringView(key.array.constData() + key.from, key.len)); + return qHash(QLatin1StringView(key.array.constData() + key.from, key.len), seed); }