qt5base-lts/tests/auto/corelib/kernel/qvariant
Lars Knoll 9d36032370 Implement QMetaType::canConvert() and use it in QVariant
Use the fact that we return the conversion function as a lambda
to find out reliably whether a conversion between two types
can be done.

This requires some minor adjustments to our tests:

* Nothing can convert to an unknown type and vice versa
* Adjust results to the fact that we don't convert from char
  to QString anymore (where the old method was incorrect)
* QStringList->QString requires some adjustments, as we only
  convert if the string list has exactly one element. For now
  we return true in canConvert(), but the conversion behavior
  in this case is something we should rethink, as it is very
  surprising.

Change-Id: I3f5f87ee9cb99d690f5a7d13b13d6a6313d8038e
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2020-08-24 00:18:24 +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 Implement QMetaType::canConvert() and use it in QVariant 2020-08-24 00:18:24 +02:00
qvariant.pro Implement QMetaType::canConvert() and use it in QVariant 2020-08-24 00:18:24 +02:00
qvariant.qrc Cleanup mess in public type ids. 2012-01-25 21:08:08 +01:00
tst_qvariant.cpp Implement QMetaType::canConvert() and use it in QVariant 2020-08-24 00:18:24 +02:00