summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qvariant.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-07-27 17:31:27 +0200
committerLars Knoll <lars.knoll@qt.io>2020-08-24 00:19:24 +0200
commit369cb1470d06b01934e616757ad98db2bb9ebb20 (patch)
tree80b16534be01cc1c8ab4e3e4c16bc96668a6587a /src/corelib/kernel/qvariant.h
parente7e7540aecc5a4a44f1d1a25e58ccbcf662cbe24 (diff)
Clean up int based convert() API
Pass QMetaType instances instead. Change-Id: I07366cea566fdebf5bb793aa8087f8109216ec0c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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;
}