Commit 26fbb50d authored by Marco Bubke's avatar Marco Bubke Committed by Thomas Hartmann

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/2452Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@nokia.com>
parent bc74ee33
......@@ -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";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment