qt5base-lts/tests/auto/corelib/kernel/qvariant
Fabian Kosmale 6892300127 QVariant: Change metatype in convert() even on failure
The documentation of convert promised that “If the cast cannot be
done, the variant is still changed to the requested type”. This was not
the case so far, because we returned too early if canConvert returned
false.
This commit changes the behavior of the method to reflect its
documentation. The documented behavior seems more useful than the
alternative of not changing the metaType, at least for common use cases
inside qtdeclarative.

Change-Id: I09b5a5efb7344e76e93de278e35c7fb2b2f87dcd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-30 06:31:36 +00: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
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qvariant.pro Cleanup API of QMimeData 2020-09-21 14:56:09 +02:00
qvariant.qrc Cleanup mess in public type ids. 2012-01-25 21:08:08 +01:00
tst_qvariant.cpp QVariant: Change metatype in convert() even on failure 2020-09-30 06:31:36 +00:00