qt5base-lts/tests/auto/corelib/tools/qhash
Ivan Solovev d11941db41 Q[Multi]Hash::reserve(): do nothing if desired size is less than current
Calling Q[Multi]Hash::reserve(n) when n is much smaller than the
current amount of elements in the hash, could result in an infinite
loop, because at some point the algorithm could not find a free bucket
for the element.

Fixing it by returning early if the new desired capacity is less than
current.

Fixes: QTBUG-102067
Pick-to: 6.3 6.2
Change-Id: I38ef0b2168c4e2a317eedf91b2155b1fdffb1c27
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-06 16:46:59 +02:00
..
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
CMakeLists.txt Add qt_internal_undefine_global_definition function 2022-02-02 16:45:37 +01:00
tst_qhash.cpp Q[Multi]Hash::reserve(): do nothing if desired size is less than current 2022-04-06 16:46:59 +02:00