qt5base-lts/tests/auto/corelib/kernel/qmetaproperty
Olivier Goffart a3a7d485fa Fix crash in QMetaProperty::write for custom types and conversion
if t >= QMetaType::User, we would not return false nor call convert.
We would then pass a pointer to whatever is in the QVariant to the
qt_metacall that is expecting a pointer to an object of a different type.

Since we have custom converters, we can call QVarent::convert even for
custom types anyway.

[ChangeLog][QtCore] Fixed crash when setting a QVariant of a different
type to a property of a custom type. Attempt to do a conversion instead.

Task-number: QTBUG-40644
Change-Id: Ib6fbd7e7ddcf25c5ee247ea04177e079f6d7de35
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-10-09 07:59:07 +00:00
..
qmetaproperty.pro tst_QMetaProperty doesn't need QtGui 2012-11-22 14:54:31 +01:00
tst_qmetaproperty.cpp Fix crash in QMetaProperty::write for custom types and conversion 2015-10-09 07:59:07 +00:00