qt6-bb10/tests/auto/corelib
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
..
animation Avoid use after free in tst_qsequentialanimationgroup 2021-06-02 16:45:23 +02:00
global Prefer QFAIL("Informative message") over QVERIFY(false) 2021-06-14 15:57:16 +02:00
io QLoggingSettingsParser: port setContent() to QStringView 2021-06-16 13:22:18 +02:00
itemmodels QSortFilterProxyModel: create mappings on demand again 2021-06-03 00:53:08 +02:00
kernel QBindable: Use setter in setValue for QObjectCompatProperty 2021-06-17 19:32:56 +02:00
mimetypes Fix BASE argument of qt_add_resources 2021-05-18 16:02:52 +02:00
platform Android: Add runOnMainAndroidThread() under QNativeInterface 2021-05-26 23:24:11 +00:00
plugin Fix BASE argument of qt_add_resources 2021-05-18 16:02:52 +02:00
serialization Prefer QFAIL("Informative message") over QVERIFY(false) 2021-06-14 15:57:16 +02:00
text Tidy up tst_QString::localeAwareCompare() 2021-06-16 17:42:37 +02:00
thread QTestlib: Add formatting for QObject * in QCOMPARE 2021-05-26 11:02:48 +00:00
time Fix and clean up utterly confused (and confusing) transition tests 2021-06-15 16:58:46 +02:00
tools QHash: Fix erase() edge-case 2021-06-18 11:20:40 +02:00
CMakeLists.txt Add tests for QAndroidApplication's sdkVersion and activity 2021-05-13 01:41:36 +03:00