summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-09-12 15:50:01 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-09-20 20:36:32 +0200
commit5c8910adfd613382e97c5517e85e9088a2abbe3e (patch)
treed9d23bbbe43dc0b2f66cae250220c1aaa4f8f1d1 /src/tools
parentbadb0818f5116e19de9bdb6f6b2e0c3e0fa7da99 (diff)
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 <fabian.kosmale@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/moc/symbols.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/moc/symbols.h b/src/tools/moc/symbols.h
index a0c83de575..869f7c793f 100644
--- a/src/tools/moc/symbols.h
+++ b/src/tools/moc/symbols.h
@@ -7,7 +7,7 @@
#include "token.h"
#include <qdebug.h>
-#include <qhash.h>
+#include <qhashfunctions.h>
#include <qlist.h>
#include <qstack.h>
#include <qstring.h>
@@ -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);
}