Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.2, 6.6.0 Beta2, 6.8.0 Beta1
-
None
-
Ubuntu 20.04, Clang 15, GCC 11, GCC 9
-
3
-
878077de2 (dev), 81adaf909 (dev), 72c3ae0a8 (6.8), 13d2398e0 (6.7), 705cec8ac (tqtc/lts-6.5)
-
Foundation Sprint 110, Foundation Sprint 111, Foundation Sprint 112
Description
Besides QTBUG-116080, we also have an unintended implementation of qHash(bool) via the 1-to-2-arg adapter (QTBUG-116971) and qHash(int). The two functions differ in the relative sequence of seed xoring and bit-mixing, making
- qHash(1, seed),
- qHash(true, seed)
produce different values, for general seed != 0.
This doesn't look fixable in Qt 6, as all involved overloads are inline, therefore immutable.
Attachments
Issue Links
- relates to
-
QTBUG-116064 [REG SiC 6.4 -> 6.5] qHash(qfloat16(x)) is now ambiguous on GCC13
- Closed
For Gerrit Dashboard: QTBUG-126674 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
571597,2 | tst_QHashFunctions: check bool/integral consistency | dev | qt/qtbase | Status: MERGED | +2 | 0 |
571598,3 | qHash(): add explicit bool overload | dev | qt/qtbase | Status: MERGED | +2 | 0 |
575796,2 | tst_QHashFunctions: check bool/integral consistency | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
575969,2 | tst_QHashFunctions: check bool/integral consistency | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
576260,3 | tst_QHashFunctions: check bool/integral consistency | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | +1 |