qt6-bb10/tests/auto
Mårten Nordheim ea7d87b5b5 QHash: Fix erase() edge-case
When the element you want to erase is the last element AND the
next element (element 0), when rehashed, would be relocated to the last
element, this leads to the state below. Which is similar to a test in
tst_qhash for some seeds.

auto it = hash.begin + (hash.size - 1)
it = hash.erase(it)
it != hash.end

By forcing the iterator to increment if we were erasing the last element
we always end up with a pointer which is equal to hash.end

Befriend the tst_qhash class so we can set the seed to a known-bad one

Pick-to: 6.2 6.1
Change-Id: Ie0b175003a2acb175ef5e3ab5a984e010f65d986
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-06-18 11:20:40 +02:00
..
bic/data Add binary compatibility files for Qt 6.0.0 2021-04-08 06:34:13 +00:00
cmake Check the impact of static link order for user projects 2021-06-16 16:58:45 +02:00
concurrent Remove the dead code for blocking methods from QtConcurrent 2021-06-14 11:52:36 +02:00
corelib QHash: Fix erase() edge-case 2021-06-18 11:20:40 +02:00
dbus Port QDBusServiceWatcher::watchedServices to bindable properties 2021-04-28 16:59:53 +02:00
gui Avoid overflow in text layout 2021-06-17 09:58:27 +00:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network Fix QFAIL() to interract correctly with QEXPECT_FAIL() 2021-06-15 18:55:16 +02:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Fix crash in concurrent disconnect 2021-06-17 08:56:22 +02:00
printsupport Remove the qmake project files 2021-01-07 15:32:28 +01:00
shared Remove false Q_UNREACHABLE from shaping code 2021-02-03 09:44:44 +01:00
sql QSqlTableModel::orderByClause(): Quote the table name 2021-05-03 14:10:36 +00:00
testlib Fix QFAIL() to interract correctly with QEXPECT_FAIL() 2021-06-15 18:55:16 +02:00
tools Remove pure-virtual-signals.h include from tst_moc.cpp 2021-06-11 17:12:12 +02:00
widgets Fix recursion crash when calling setStyleSheet with `qproperty-styleSheet` 2021-06-18 05:34:52 +00:00
xml tst_qdom: clean-up the code enabled only before Qt 6 2021-01-15 15:22:08 +01:00
CMakeLists.txt CMake: Build minimal subset of tests in desktop static builds 2021-04-06 09:15:37 +01:00
network-settings.h Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00