aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlproperty.cpp
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>2012-03-05 14:45:34 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-13 12:58:48 +0100
commit83f11e33745180e9370d484cbcedd0bac020c9dd (patch)
tree83fc4cefbdb9af685ac172c499e3af938fc4e070 /src/qml/qml/qqmlproperty.cpp
parent7a5651b4f9fef530e1dc5516899c7f481f4480ef (diff)
Crash fix after QMetaType change.
QMetaType::UnknownType was added so we can distinguish between "void" and an unregistered type. Change-Id: If8cee21b3f84bf129343dc457d10ab31a9bfc8b8 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlproperty.cpp')
-rw-r--r--src/qml/qml/qqmlproperty.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index 86e18229ef..34d9d0a5f5 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -1147,7 +1147,7 @@ bool QQmlPropertyPrivate::writeEnumProperty(const QMetaProperty &prop, int idx,
return false;
} else if (v.userType() != QVariant::Int && v.userType() != QVariant::UInt) {
int enumMetaTypeId = QMetaType::type(QByteArray(menum.scope() + QByteArray("::") + menum.name()));
- if ((enumMetaTypeId == 0) || (v.userType() != enumMetaTypeId) || !v.constData())
+ if ((enumMetaTypeId == QMetaType::UnknownType) || (v.userType() != enumMetaTypeId) || !v.constData())
return false;
v = QVariant(*reinterpret_cast<const int *>(v.constData()));
}