diff options
author | Marco Bubke <marco.bubke@nokia.com> | 2011-08-01 20:39:55 +0200 |
---|---|---|
committer | Thomas Hartmann <Thomas.Hartmann@nokia.com> | 2011-08-02 10:22:34 +0200 |
commit | 26fbb50dc2eebcfae9a5e2e153f0d6a86922b30c (patch) | |
tree | db66498c86f70e50c1fb0b0392e8362a939b2271 /share/qtcreator/qml | |
parent | bc74ee33930af92291fd6da2f18d44fcbc9c44b8 (diff) | |
download | qt-creator-26fbb50dc2eebcfae9a5e2e153f0d6a86922b30c.tar.gz |
QmlDesigner.NodeInstances: Show binding in text if invalid
If a binding on a text property cannot be evaluated it will now will be
show as #binding.text#
Change-Id: Ib1d5f406724b262833215d30ec0966a75f9dc971
Reviewed-on: http://codereview.qt.nokia.com/2452
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Diffstat (limited to 'share/qtcreator/qml')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp index a0ffd18e9e..932f22e415 100644 --- a/share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp @@ -435,8 +435,12 @@ void ObjectNodeInstance::setPropertyBinding(const QString &name, const QString & if (oldBinding && !hasValidResetBinding(name)) oldBinding->destroy(); binding->update(); - if (binding->hasError()) + if (binding->hasError()) { qDebug() <<" ObjectNodeInstance.setPropertyBinding has Error: " << object() << name << expression << binding->error().toString(); + if (property.property().userType() == QVariant::String) + property.write(QVariant(QString("#%1#").arg(expression))); + } + } else { qWarning() << "ObjectNodeInstance.setPropertyBinding: Cannot set binding for property" << name << ": property is unknown for type"; } |