qt6-bb10/tests/auto/corelib/kernel/qvariant
Fabian Kosmale 6a0e59ed50 QVariant: Avoid crash when constructed from unsuitable metatype
If the metatype does not support copy and default construction, then it
it unsuitunsuitable for use in QMetaType. We cannot prevent users from
passing in such metatypes (as we have e.g. a ctor taking QMetaType), so
verify this in customConstruct, and make the variant invalid in that
case.

Pick-to: 6.2 6.3 6.4
Change-Id: Ib1f0149c8fb9a1cce0049fd0311980754cc85d1b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-21 08:37:34 -07:00
..
stream Remove QRegExp from QVariant 2020-05-14 12:19:47 +00:00
.gitignore
CMakeLists.txt CMake: Add BUILTIN_TESTDATA option to qt_internal_add_test 2022-02-11 21:54:44 +01:00
tst_qvariant.cpp QVariant: Avoid crash when constructed from unsuitable metatype 2022-07-21 08:37:34 -07:00