summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-02-16 03:12:22 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-02-16 03:12:22 (GMT)
commitdd4d3e1ce0adba26396c5ab4e77c728e2159ff30 (patch)
tree9871e39a6dc1526ec72acc2711f44d427fab0089 /src/declarative
parent4ac03faff3297ec0c8804ebd4ee8ffee297c5453 (diff)
downloadQt-dd4d3e1ce0adba26396c5ab4e77c728e2159ff30.zip
Qt-dd4d3e1ce0adba26396c5ab4e77c728e2159ff30.tar.gz
Qt-dd4d3e1ce0adba26396c5ab4e77c728e2159ff30.tar.bz2
Don't delete binding directly
Bindings should be destroyed by calling their destroy() method, not by deleting them.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qmlmetaproperty.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp
index f23a50a..d63261c 100644
--- a/src/declarative/qml/qmlmetaproperty.cpp
+++ b/src/declarative/qml/qmlmetaproperty.cpp
@@ -754,8 +754,10 @@ bool QmlMetaPropertyPrivate::writeValueProperty(const QVariant &value,
QmlMetaProperty::WriteFlags flags)
{
// Remove any existing bindings on this property
- if (!(flags & QmlMetaProperty::DontRemoveBinding))
- delete q->setBinding(0);
+ if (!(flags & QmlMetaProperty::DontRemoveBinding)) {
+ QmlAbstractBinding *binding = q->setBinding(0);
+ if (binding) binding->destroy();
+ }
bool rv = false;
uint type = q->type();