summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-04-06 13:20:18 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-11-04 19:11:41 +0000
commitd674d227f7ab22aed206d3a7f5c96e5e8dfa48f2 (patch)
treeba34fe472c3e51eebf3075bf9524d0e339f08e76 /src/corelib/tools
parent92c61b11c1704450adfa3a8ac839478c0f3dd19d (diff)
qGlobalQHashSeed: initialize the seed before returning it
If you had never used QHash before, this function returned -1. That's not useful if you're trying to implement your own QHash that uses Qt's global seed. Change-Id: Ib0e40a7a3ebc44329f23fffd14b2e875b970a55c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qhash.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 4cc9ec8ec8..1662e944cf 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -361,6 +361,7 @@ static void qt_initialize_qhash_seed()
*/
int qGlobalQHashSeed()
{
+ qt_initialize_qhash_seed();
return qt_qhash_seed.load();
}