qt5base-lts/util
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
..
accessibilityinspector Avoid non-standard indentation of license headers. 2012-01-30 16:40:10 +01:00
corelib/qurl-generateTLDs Stop relying on qHash always giving the same results 2012-04-08 21:44:26 +02:00
harfbuzz Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
integrity Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
lexgen Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
local_database QLocale: Merge month name data storage to save 50KB memory 2012-04-03 19:12:27 +02:00
plugintest Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
scripts Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
unicode clean up qmake-generated projects 2012-02-24 05:18:30 +01:00
xkbdatagen Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00