aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlbinding.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlbinding.cpp')
-rw-r--r--src/qml/qml/qqmlbinding.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp
index d4a8b87aaa..5c9b14ba74 100644
--- a/src/qml/qml/qqmlbinding.cpp
+++ b/src/qml/qml/qqmlbinding.cpp
@@ -386,7 +386,8 @@ Q_NEVER_INLINE bool QQmlBinding::slowWrite(const QQmlPropertyData &core, const Q
const char *valueType = 0;
const char *propertyType = 0;
- if (value.userType() == QMetaType::QObjectStar) {
+ const int userType = value.userType();
+ if (userType == QMetaType::QObjectStar) {
if (QObject *o = *(QObject *const *)value.constData()) {
valueType = o->metaObject()->className();
@@ -394,11 +395,11 @@ Q_NEVER_INLINE bool QQmlBinding::slowWrite(const QQmlPropertyData &core, const Q
if (!propertyMetaObject.isNull())
propertyType = propertyMetaObject.className();
}
- } else if (value.userType() != QVariant::Invalid) {
- if (value.userType() == QMetaType::VoidStar)
+ } else if (userType != QVariant::Invalid) {
+ if (userType == QMetaType::Nullptr || userType == QMetaType::VoidStar)
valueType = "null";
else
- valueType = QMetaType::typeName(value.userType());
+ valueType = QMetaType::typeName(userType);
}
if (!valueType)