pub unsafe fn q_set_global_q_hash_seed(new_seed: c_int)
Expand description

Sets the global QHash seed to newSeed.

Calls C++ function: void qSetGlobalQHashSeed(int newSeed).

C++ documentation:

Sets the global QHash seed to newSeed.

Manually setting the global QHash seed value should be done only for testing and debugging purposes, when deterministic and reproducible behavior on a QHash is needed. We discourage to do it in production code as it can make your application susceptible to algorithmic complexity attacks.

The seed is set in any newly created QHash. See qHash about how this seed is being used by QHash.

If the environment variable QT_HASH_SEED is set, calling this function will result in a no-op.

Passing the value -1 will reinitialize the global QHash seed to a random value.

This function was introduced in Qt 5.6.

See also qGlobalQHashSeed.