qt6-bb10/tests/auto/widgets/kernel/qformlayout
Volker Hilsheimer 1822550529 QFormLayout: Fix assert when showing with hidden rows
Amends a74cdf778c, after which the
initialization of items in invisible rows is skipped. Since data members
in QFormLayoutItem were lazily initialized, this resulted in out-of-bounds
access of QList entries.

Use member initialization for all QFormLayoutItem fields, and check that
vLayoutIndex is valid before using it to access the list entry. Skip
labels and fields for which it is not initialized.

Add test case. As a drive-by, silence the test's provoked warning
messages via ignoreMessage.

Change-Id: I374b414a51df20b9af3087a2676061fc6b7f23e2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-03-15 12:45:46 +01:00
..
.gitignore Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
BLACKLIST Fix tst_qformlayout::wrapping on Android 2022-02-24 23:41:14 +01:00
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
tst_qformlayout.cpp QFormLayout: Fix assert when showing with hidden rows 2022-03-15 12:45:46 +01:00