summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlbinding.cpp
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-11-12 05:34:21 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-11-12 05:34:21 (GMT)
commit05c1b075f757afcc87748ac6758277eb5c0d8e17 (patch)
tree9f3159998e643ccd96313c94fb5eac2782aa3aab /src/declarative/qml/qmlbinding.cpp
parent87845845cd5b44bc4ad391ad5ae8499f3850acb3 (diff)
parentdb3ae6188c8f88f25b4f8e2645e76a7c6fffef18 (diff)
downloadQt-05c1b075f757afcc87748ac6758277eb5c0d8e17.zip
Qt-05c1b075f757afcc87748ac6758277eb5c0d8e17.tar.gz
Qt-05c1b075f757afcc87748ac6758277eb5c0d8e17.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/qml/qmlbinding.cpp')
-rw-r--r--src/declarative/qml/qmlbinding.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlbinding.cpp b/src/declarative/qml/qmlbinding.cpp
index b0a4d6e..ef92308 100644
--- a/src/declarative/qml/qmlbinding.cpp
+++ b/src/declarative/qml/qmlbinding.cpp
@@ -175,7 +175,18 @@ void QmlBinding::update(QmlMetaProperty::WriteFlags flags)
bool isUndefined = false;
QVariant value = this->value(&isUndefined);
- if (!isUndefined && data->property.object() &&
+ if (isUndefined && !data->error.isValid()) {
+
+ QUrl url = data->url;
+ int line = data->line;
+ if (url.isEmpty()) url = QUrl(QLatin1String("<Unknown File>"));
+
+ data->error.setUrl(url);
+ data->error.setLine(line);
+ data->error.setColumn(-1);
+ data->error.setDescription(QLatin1String("Unable to assign [undefined] to ") + QLatin1String(QMetaType::typeName(data->property.propertyType())));
+
+ } else if (!isUndefined && data->property.object() &&
!data->property.write(value, flags)) {
QUrl url = data->url;