qt5base-lts/tests/auto
Edward Welbourne 2b16997116 Clean up tst_QSettings::testVariantTypes()
Give the macro and its parameters clearer names, wrap the macro body
in do {...} while (0), use QCOMPARE() rather than QVERIFY()ing
comparisons, convert the result type to QMetaType::Type rather than
QVariant's deprecated equivalent, save one macro parameter by using
decltype() on another. Simplify one check by pulling out a common
sub-expression as a local variable.

In the process, give the settings keys meaningful names rather than
just "key" with a numeric suffix.

Ideally this test would be reworked to be data-driven, instead of
using macros, but the use of qvariant_cast<> to convert a read-back
value, along with the variable type of the input value compared to the
result of that cast, precludes this (as far as I can see).

Change-Id: I4e083cd0dea14d723910873829352e15740006bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-26 15:10:15 +02:00
..
bic/data Add BC files for 6.2.0 2022-01-07 13:31:38 +00:00
cmake CMake: Add deployment auto test 2022-03-16 15:56:17 +01:00
concurrent Tests: Do not depend on transitive includes 2022-03-17 17:14:37 +01:00
corelib Clean up tst_QSettings::testVariantTypes() 2022-04-26 15:10:15 +02:00
dbus tests: Remove unused SRCDIR defines 2021-08-17 12:41:57 +00:00
gui rhi: Add a feature flag for non-fill polygon modes 2022-04-22 14:34:46 +02:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network tst_QNetworkProxyFactory cleanup genericSystemProxy skipping 2022-04-21 22:25:12 +02:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Windows QPA: Fix slowdown with large table/tree views with accessibility 2022-03-31 09:04:09 -03:00
printsupport QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
shared Remove false Q_UNREACHABLE from shaping code 2021-02-03 09:44:44 +01:00
sql Replace uses of _qba with _ba 2022-04-07 19:30:17 +02:00
testlib Replace uses of _qs with _s in tests 2022-04-07 19:30:17 +02:00
tools uic: use C string literals for setObjectName() 2022-03-18 18:35:03 +01:00
widgets QApplication: deliver activation events for non-widget windows 2022-04-21 22:05:05 +02:00
xml QDom: preserve empty CDATA sections 2022-03-26 12:01:14 +01:00
CMakeLists.txt Don't build tests/auto/tools when cross-compiling 2021-10-07 08:03:40 +02:00
network-settings.h Fix check for IPV6 support without certain features 2022-02-28 22:08:21 +00:00