forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Thomas Hartmann
parent
bc74ee3393
commit
26fbb50dc2
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user