QDuplicateTracker: store the current seed in the hasher
It's allowed to change asynchronously by another thread. Change-Id: I6cdea00671e8479b9c50fffd167836a08a42cc1d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 3458dd2d4773de379ea4c8309096d6e2cfd8a339) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
fd01a9fb75
commit
9b165a3487
@ -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…
x
Reference in New Issue
Block a user