QVariant::canConvert: Use the old type when checking for QObject* conversion.
Change-Id: I8450c74ecfdeee96e73b82438c5ef83c3acf4444 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>bb10
parent
e9a69c3ba9
commit
cc594d2064
|
|
@ -2946,7 +2946,7 @@ bool QVariant::convert(int targetTypeId)
|
|||
if (oldValue.isNull())
|
||||
return false;
|
||||
|
||||
if ((QMetaType::typeFlags(d.type) & QMetaType::PointerToQObject) && (QMetaType::typeFlags(targetTypeId) & QMetaType::PointerToQObject)) {
|
||||
if ((QMetaType::typeFlags(oldValue.userType()) & QMetaType::PointerToQObject) && (QMetaType::typeFlags(targetTypeId) & QMetaType::PointerToQObject)) {
|
||||
create(targetTypeId, &oldValue.d.data.o);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue