QDuplicateTracker: store the current seed in the hasher
It's allowed to change asynchronously by another thread. Pick-to: 6.1 6.0 5.15 Change-Id: I6cdea00671e8479b9c50fffd167836a08a42cc1d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
parent
d385158d52
commit
3458dd2d47
@ -67,8 +67,9 @@ class QDuplicateTracker {
|
||||
#ifdef __cpp_lib_memory_resource
|
||||
template <typename HT>
|
||||
struct QHasher {
|
||||
size_t storedSeed = qGlobalQHashSeed();
|
||||
size_t operator()(const HT &t) const {
|
||||
return QHashPrivate::calculateHash(t, qGlobalQHashSeed());
|
||||
return QHashPrivate::calculateHash(t, storedSeed);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user