qt6-bb10/src/corelib
Giuseppe D'Angelo ddb70bee2f Stop relying on qHash always giving the same results
The implementation of the various qHash overloads offered by
Qt can change at any time for any reason
(speed, quality, security, ...).

Therefore, relying on the fact that qHash will always give
an identical result across Qt versions (... across different
processes, etc.), given identical input, is wrong.
Note that this also implies that one cannot rely on QHash
having a stable ordering (even without the random qHash seed).

For such use cases, one must use f.i. a private hash function
that will never change outside his own control.

This patch adds a private hash function for QStrings,
which is identical to the Qt(4) qHash(QString) implementation.
A couple of spots in Qt where the results of a qHash call were
actually saved on disk are ported to use the new function,
and a bit of documentation is added to QHash docs.

Change-Id: Ia3731ea26ac68649b535b95e9f36fbec3df693c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-08 21:44:26 +02:00
..
animation Fix deadlock in QPropertyAnimation 2012-03-07 12:48:49 +01:00
arch Unify the atomic implementation for x86 architectures 2012-03-28 01:51:40 +02:00
codecs Restore some source compatibility 2012-03-12 10:51:49 +01:00
global Remove references to QT_NO_STL from QtCore 2012-04-07 05:19:42 +02:00
io Stop relying on qHash always giving the same results 2012-04-08 21:44:26 +02:00
itemmodels Document that the order of results from QAIM::match are not relevant. 2012-04-04 17:35:33 +02:00
json Clean up constructors for "statics" in QString and QByteArray 2012-04-04 23:29:37 +02:00
kernel Introduce initializer macros for QString- and QByteArrayData 2012-04-04 23:29:52 +02:00
mimetypes Make comment() work in the C locale too. 2012-03-22 13:29:50 +01:00
plugin QUuid: mark as Q_PRIMITIVE_TYPE 2012-04-02 18:32:45 +02:00
statemachine Introduce initializer macros for QString- and QByteArrayData 2012-04-04 23:29:52 +02:00
thread Unify the atomic implementation for x86 architectures 2012-03-28 01:51:40 +02:00
tools Stop relying on qHash always giving the same results 2012-04-08 21:44:26 +02:00
xml Remove all calls to, and deprecate qMalloc, qRealloc and qFree. 2012-03-31 16:46:40 +02:00
Qt5CoreConfigExtras.cmake.in Make the CONFIG and QT_CONFIG contents available downstream. 2012-03-02 15:55:29 +01:00
Qt5CoreMacros.cmake Use the CMake definition of Windows for CMake macros. 2012-02-23 01:36:14 +01:00
QtCore.dynlist Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
corelib.pro Import QMimeType / QMimeDatabase into QtCore. 2012-02-18 22:19:43 +01:00
eval.pri Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00