summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qvariant.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qvariant.h')
-rw-r--r--src/corelib/kernel/qvariant.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index 48ea3a9a03..e9509e637a 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -698,7 +698,7 @@ template<typename T> inline T qvariant_cast(const QVariant &v)
return v.d.get<T>();
T t{};
- QMetaType::convert(v.constData(), v.userType(), &t, qMetaTypeId<T>());
+ QMetaType::convert(v.metaType(), v.constData(), targetType, &t);
return t;
}