diff options
Diffstat (limited to 'src/corelib/kernel/qvariant.h')
-rw-r--r-- | src/corelib/kernel/qvariant.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 9628dbf..cb2825c 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -589,8 +589,7 @@ template<typename T> inline T qvariant_cast(const QVariant &v) template<> inline QVariant qvariant_cast<QVariant>(const QVariant &v) { - static const int vid = qRegisterMetaType<QVariant>("QVariant"); - if (vid == v.userType()) + if (v.userType() == QMetaType::QVariant) return *reinterpret_cast<const QVariant *>(v.constData()); return v; } |