diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-04-21 16:42:56 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-06-10 07:55:36 +0000 |
commit | 37d02d62d8d14fdaa0884f96f7840661413a95c2 (patch) | |
tree | 8e3f3dd9dafd574b99ca686e657d7e73f8f7eef5 /src/qml/qml/qqmlbinding_p.h | |
parent | eb7db5934b453eea2946ed7ae9a188c44467cf23 (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/qqmlbinding_p.h')
-rw-r--r-- | src/qml/qml/qqmlbinding_p.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlbinding_p.h b/src/qml/qml/qqmlbinding_p.h index 4d6c67eb47..cb90c757b2 100644 --- a/src/qml/qml/qqmlbinding_p.h +++ b/src/qml/qml/qqmlbinding_p.h @@ -65,6 +65,7 @@ class QQmlContext; class Q_QML_PRIVATE_EXPORT QQmlBinding : public QQmlJavaScriptExpression, public QQmlAbstractBinding { + friend class QQmlAbstractBinding; public: QQmlBinding(const QString &, QObject *, QQmlContext *); QQmlBinding(const QQmlScriptString &, QObject *, QQmlContext *); @@ -72,6 +73,7 @@ public: QQmlBinding(const QString &, QObject *, QQmlContextData *, const QString &url, quint16 lineNumber, quint16 columnNumber); QQmlBinding(const QV4::Value &, QObject *, QQmlContextData *); + ~QQmlBinding(); void setTarget(const QQmlProperty &); void setTarget(QObject *, const QQmlPropertyData &); @@ -94,10 +96,6 @@ public: virtual QString expressionIdentifier(); virtual void expressionChanged(); -protected: - friend class QQmlAbstractBinding; - ~QQmlBinding(); - private: inline bool updatingFlag() const; inline void setUpdatingFlag(bool); |