aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlproperty_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-04-21 16:42:56 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-10 07:55:36 +0000
commit37d02d62d8d14fdaa0884f96f7840661413a95c2 (patch)
tree8e3f3dd9dafd574b99ca686e657d7e73f8f7eef5 /src/qml/qml/qqmlproperty_p.h
parenteb7db5934b453eea2946ed7ae9a188c44467cf23 (diff)
Make bindings refcounted
Refcounting our bindings greatly simplifies our memory management of the objects and ensures we safely clean them all up. In addition, it allows us to remove the m_mePtr and weak reference handling from QQmlAbstractBinding as we can safely handle this through the same mechanism. Change-Id: If23ebc8be276096146952b0008b62018f5d57faf Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlproperty_p.h')
-rw-r--r--src/qml/qml/qqmlproperty_p.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlproperty_p.h b/src/qml/qml/qqmlproperty_p.h
index d0ffbe80fc..4a8399a9ab 100644
--- a/src/qml/qml/qqmlproperty_p.h
+++ b/src/qml/qml/qqmlproperty_p.h
@@ -106,16 +106,15 @@ public:
enum BindingFlag {
None = 0,
- DestroyOldBinding = 0x1,
- DontEnable = 0x2
+ DontEnable = 0x1
};
Q_DECLARE_FLAGS(BindingFlags, BindingFlag)
static void setBinding(QQmlAbstractBinding *binding, BindingFlags flags = None, WriteFlags writeFlags = DontRemoveBinding);
- static QQmlAbstractBinding *removeBinding(const QQmlProperty &that, BindingFlag flag = None);
- static QQmlAbstractBinding *removeBinding(QObject *o, int index, QQmlPropertyPrivate::BindingFlag flags = None);
- static QQmlAbstractBinding *removeBinding(QQmlAbstractBinding *b, BindingFlag flag = None);
+ static void removeBinding(const QQmlProperty &that);
+ static void removeBinding(QObject *o, int index);
+ static void removeBinding(QQmlAbstractBinding *b);
static QQmlAbstractBinding *binding(QObject *, int index);
static QQmlPropertyData saveValueType(const QQmlPropertyData &,