Skip to content

Commit

Permalink
qGlobalQHashSeed: initialize the seed before returning it
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
thiagomacieira committed Nov 4, 2017
1 parent 92c61b1 commit d674d22
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/corelib/tools/qhash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ static void qt_initialize_qhash_seed()
*/
int qGlobalQHashSeed()
{
qt_initialize_qhash_seed();
return qt_qhash_seed.load();
}

Expand Down

0 comments on commit d674d22

Please sign in to comment.