diff options
Diffstat (limited to 'src/corelib/kernel/qvariant.h')
-rw-r--r-- | src/corelib/kernel/qvariant.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index d5ea491288..3345131c0f 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -756,7 +756,9 @@ namespace QtPrivate { #ifndef QT_NO_QOBJECT static T object(const QVariant &v) { - return qobject_cast<T>(QMetaType::typeFlags(v.userType()) & QMetaType::PointerToQObject ? v.d.data.o : 0); + return qobject_cast<T>(QMetaType::typeFlags(v.userType()) & QMetaType::PointerToQObject + ? v.d.data.o + : QVariantValueHelper::metaType(v)); } #endif }; |