QHash: add a Qt 7 TODO

The hashing seed's type has been changed from int to size_t in Qt 6.
However the functions setting/getting the seed, and the seed itself,
are still simply int, meaning that we've crippled our seeding.
Add a TODO to amend it.

Change-Id: Ie9dd177149ec299ccf16d4e31f9f4b065804cfed
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Giuseppe D'Angelo 2021-03-16 10:46:16 +01:00
parent 58437836f0
commit 37e0953613
2 changed files with 2 additions and 0 deletions

View File

@ -740,6 +740,7 @@ static uint qt_create_qhash_seed()
/*
The QHash seed itself.
*/
// ### Qt 7: this should use size_t, not int.
static QBasicAtomicInt qt_qhash_seed = Q_BASIC_ATOMIC_INITIALIZER(-1);
/*!

View File

@ -64,6 +64,7 @@ class QByteArray;
class QString;
class QLatin1String;
// ### Qt 7: these should use size_t, not int.
Q_CORE_EXPORT int qGlobalQHashSeed();
Q_CORE_EXPORT void qSetGlobalQHashSeed(int newSeed);