aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlproperty.cpp
diff options
context:
space:
mode:
authorChris Adams <christopher.adams@nokia.com>2012-05-31 14:48:18 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-01 09:34:30 +0200
commit2c65dce8f68bfb03848dbd395fd1501fd7cd1510 (patch)
treed8cf7cebcde5cab31647a2fd676b09bf3ae8c0fd /src/qml/qml/qqmlproperty.cpp
parenta63f318319c6eaef7bc7aeab2be4c83dcd06f084 (diff)
Fix another crash due to unregistered enum types
f62ab0a3dfaa873bb15cd1526f98f50a17228a9c missed one other case, when binding valid property values to invalid property types. This commit fixes that case, and adds both binding and assignment tests for that case. Change-Id: Iaca889e4214d2218012d30c4a00f2aac886375f7 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlproperty.cpp')
-rw-r--r--src/qml/qml/qqmlproperty.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index b3f5d5fd88..7e021d4ba9 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -1603,6 +1603,8 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object,
valueType = "null";
if (!propertyType)
propertyType = QMetaType::typeName(type);
+ if (!propertyType)
+ propertyType = "[unknown property type]";
expression->delayedError()->error.setDescription(QLatin1String("Unable to assign ") +
QLatin1String(valueType) +