summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlbinding_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-10-08 03:25:56 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-08 03:25:56 (GMT)
commit41ec742f6713f5b3b4da853f514d685c35c3f31f (patch)
tree6088d2e80f64c80d2168a603fea28ab9ffb4efe3 /src/declarative/qml/qmlbinding_p.h
parent60a5afb67efcefa74cf452379dcef46b83daa265 (diff)
downloadQt-41ec742f6713f5b3b4da853f514d685c35c3f31f.zip
Qt-41ec742f6713f5b3b4da853f514d685c35c3f31f.tar.gz
Qt-41ec742f6713f5b3b4da853f514d685c35c3f31f.tar.bz2
Make qmlecmascript:selfDeletingBinding pass
Expressions and bindings must not reference data following their evalutation incase their object has been deleted. To solve this, the needed data is separated into a reference counted QmlExpressionData and QmlBindingData object.
Diffstat (limited to 'src/declarative/qml/qmlbinding_p.h')
-rw-r--r--src/declarative/qml/qmlbinding_p.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/declarative/qml/qmlbinding_p.h b/src/declarative/qml/qmlbinding_p.h
index 963e2c1..2c0c6b9 100644
--- a/src/declarative/qml/qmlbinding_p.h
+++ b/src/declarative/qml/qmlbinding_p.h
@@ -59,11 +59,10 @@
QT_BEGIN_NAMESPACE
-class QmlBindingPrivate : public QmlExpressionPrivate
+class QmlBindingData : public QmlExpressionData
{
- Q_DECLARE_PUBLIC(QmlBinding)
public:
- QmlBindingPrivate();
+ QmlBindingData();
bool updating:1;
bool enabled:1;
@@ -71,6 +70,16 @@ public:
QmlMetaProperty property;
};
+class QmlBindingPrivate : public QmlExpressionPrivate
+{
+ Q_DECLARE_PUBLIC(QmlBinding)
+public:
+ QmlBindingPrivate();
+
+ QmlBindingData *bindingData() { return static_cast<QmlBindingData *>(data); }
+ const QmlBindingData *bindingData() const { return static_cast<const QmlBindingData *>(data); }
+};
+
QT_END_NAMESPACE
#endif // QMLBINDING_P_H