summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-01-26 16:08:35 -0800
committerThiago Macieira <thiago.macieira@intel.com>2024-02-12 17:01:33 -0800
commit0d15c000ad0dbdc5c04af0fd5b5799f2cd37d696 (patch)
tree06803673447714b2974d6712e7fe24b360e80c15 /tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
parent1d7950c9467ba4db75ac065bd54ffe08e4a29710 (diff)
qHash: backport the q(u)int128-to-quint64 reduction trick to 32-bit
I didn't do it in a template because the 32-bit code requires a compatibility hack for Qt 6 and it's using an XOR of the high and low parts. Fixes: QTBUG-116080 Change-Id: I5dd50a1a7ca5424d9e7afffd17ae0ba5b9ff52f6 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp')
-rw-r--r--tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
index aebc0422ad..b9a7d88056 100644
--- a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
+++ b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
@@ -195,7 +195,7 @@ void tst_QHashFunctions::signedIntegerConsistency()
if (v32 == value) {
// because of QTBUG-116080, this may not match, but we can't guarantee
// it mismatches 100% of the time either
- if constexpr (sizeof(size_t) > sizeof(int))
+ if constexpr (sizeof(size_t) > sizeof(int) || QT_VERSION_MAJOR > 6)
QCOMPARE(hs64, hs32);
}