summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qelapsedtimer.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-01-31 15:27:57 -0800
committerThiago Macieira <thiago.macieira@intel.com>2022-03-15 15:05:44 -0800
commitcc5cc3225d6a397270a6d4c615e850e43db805c4 (patch)
treec490005eaea2e5049880cf56d380e07bb651f9d8 /src/corelib/kernel/qelapsedtimer.cpp
parent41b2c4204bd965532b5a79a44d6b0ad6727d3683 (diff)
QHash: Initialize the hash seed as soon as QtCore loads
Instead of lazily initializing (with some platform exceptions, see the equivalent qsimd.cpp commit). The rationale is the same as for qCpuFeatures(): this the qHashBits() function is hot and the current code generation needs to save a lot of state because of the possible call to the C++ runtime functions to enable the thread-safe initialization of the hash seed. [ChangeLog][Important Behavior Changes] QtCore now initializes the QHash global seed before the main() function is run, so it is no longer possible to use qputenv() to affect the seed value for the current process. Disabling the random global seed for the current process should be done programmatically with by calling either the 6.2 function QHashSeed::setDeterministicGlobalSeed() or, if compatibility with Qt 5 is required, by calling qSetGlobalQHashSeed() with value 0. Change-Id: I54f205f6b7314351b078fffd16cf7eae93f9e27e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/kernel/qelapsedtimer.cpp')
0 files changed, 0 insertions, 0 deletions