qt6-bb10/tests/auto/widgets/kernel/qformlayout
Marc Mutz 4bf5a3c885 tst_QFormLayout: Fix UB (invalid enum value) in several functions
The code coerced a -123 into a QFormLayout::ItemFlags, which, however,
being an enum with enumeration values 0..2, only has valid numerical
values 0..3.

Fix by using 3 as the value to represent the invalid enum value, and
store this in a constant so as not to distribute this magic number
all around the test class.

Change-Id: Ie5e93a69ef5a3acdde43030b022e0cce8aec484d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-11-22 05:38:45 +00:00
..
.gitignore
qformlayout.pro QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-28 02:02:14 +01:00
tst_qformlayout.cpp tst_QFormLayout: Fix UB (invalid enum value) in several functions 2016-11-22 05:38:45 +00:00