aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlabstractbinding_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-04-16 22:15:27 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-05 08:37:28 +0000
commit13ec9ab3b898a67403ce0031c4cfdc74d95d5560 (patch)
treefb1242373ebb385ccc306e02b941d9a64c3d6ff9 /src/qml/qml/qqmlabstractbinding_p.h
parentdb568f812464644b36418415a05399ccdf2022c2 (diff)
Move the target object into the base class
Change-Id: I912d7665b49c8e9b2d38e78bfcfc4b3d39ca7459 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlabstractbinding_p.h')
-rw-r--r--src/qml/qml/qqmlabstractbinding_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlabstractbinding_p.h b/src/qml/qml/qqmlabstractbinding_p.h
index d4cb4e0e9e..aa76c9aeba 100644
--- a/src/qml/qml/qqmlabstractbinding_p.h
+++ b/src/qml/qml/qqmlabstractbinding_p.h
@@ -77,7 +77,7 @@ public:
// Should return the object for the binding. Should return this object even if the
// binding is not enabled or added to the object.
- virtual QObject *targetObject() const = 0;
+ QObject *targetObject() const { return m_target.data(); }
virtual void setEnabled(bool e, QQmlPropertyPrivate::WriteFlags f = QQmlPropertyPrivate::DontRemoveBinding) = 0;
@@ -121,6 +121,9 @@ private:
// This saves a compiler-generated pointer to a compiler-generated vTable, and thus reduces
// the binding object size by sizeof(void*).
qintptr m_nextBindingPtr;
+
+protected:
+ QFlagPointer<QObject> m_target;
};
QQmlAbstractBinding::Pointer