summaryrefslogtreecommitdiff
path: root/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@digia.com>2013-04-10 10:18:36 +0200
committerThomas Hartmann <Thomas.Hartmann@digia.com>2013-04-10 14:42:38 +0200
commit7b94ac13ed5bc3f5402535700785120c69f292c4 (patch)
treec7f8218c7aa8cb340d80300fe242196abf3be07e /src/plugins/qmldesigner/designercore/model/bindingproperty.cpp
parent2a261588f4a1d6eb87b037fd2aa9166740f7b8cd (diff)
downloadqt-creator-7b94ac13ed5bc3f5402535700785120c69f292c4.tar.gz
QmlDesigner.Model: Adding warnings
The API is confusing so we give a warning. Change-Id: I7a26766609316772bebc3088d820d472243b2c74 Reviewed-by: Marco Bubke <marco.bubke@digia.com> Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Diffstat (limited to 'src/plugins/qmldesigner/designercore/model/bindingproperty.cpp')
-rw-r--r--src/plugins/qmldesigner/designercore/model/bindingproperty.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp b/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp
index 482a3e45d2..3346eef6a6 100644
--- a/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp
+++ b/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp
@@ -62,6 +62,9 @@ void BindingProperty::setExpression(const QString &expression)
if (!isValid())
throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
+ if (isDynamic())
+ qWarning() << "Calling BindingProperty::setExpression on dynamic property.";
+
if (name() == "id") { // the ID for a node is independent of the state, so it has to be set with ModelNode::setId
throw InvalidPropertyException(__LINE__, __FUNCTION__, __FILE__, name());
}