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>
This commit is contained in:
parent
badb0818f5
commit
5c8910adfd
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user