qt5base-lts/tests/auto/corelib/kernel/qvariant
Lars Knoll 048debe8f9 Restrict QVariant::isNull() behavior
isNull() would forward to the contained type and check that type's
isNull() method for some of the builtin types. Remove that behavior
and only return true in isNull(), if the variant is invalid, doesn't
contain data or contains a null pointer.

In addition, implement more consistent behavior when constructing
a QVariant using the internal API taking a copy from a void *.
isNull() should return true in both cases. This mainly changes behavior
for some corner cases and when using our internal API.

[ChangeLog][Important Behavior Changes] QVariant::isNull()
no longer returns true when the variant contains an object of some
type with an isNull() method, that returns true for the object;
QVariant::isNull() now only returns true when the variant contains
no object or a null pointer.

Change-Id: I3125041c4f8f8618a04aa375aa0a56b19c02dcf5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-08-13 08:48:32 +02:00
..
stream Remove QRegExp from QVariant 2020-05-14 12:19:47 +00:00
.gitignore Moving relevant tests to corelib/kernel 2011-09-01 12:42:14 +02:00
.prev_CMakeLists.txt CMake: Regenerate tests projects 2020-03-12 11:41:39 +01:00
CMakeLists.txt CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qvariant.pro Remove QLinkedList 2020-02-19 21:01:07 +01:00
qvariant.qrc Cleanup mess in public type ids. 2012-01-25 21:08:08 +01:00
tst_qvariant.cpp Restrict QVariant::isNull() behavior 2020-08-13 08:48:32 +02:00