diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-09-28 00:38:30 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-10-11 22:47:47 (GMT) |
commit | ac507b4752dcd065038130d224910a6dc64f8f37 (patch) | |
tree | 629acc0c7b4afd4b474d66b27bf8b6ca161c85c0 /src/declarative/qml/qmlbinding.cpp | |
parent | 9b7d77460c38ec93d98fa4779826b32bea2eaaff (diff) | |
download | Qt-ac507b4752dcd065038130d224910a6dc64f8f37.zip Qt-ac507b4752dcd065038130d224910a6dc64f8f37.tar.gz Qt-ac507b4752dcd065038130d224910a6dc64f8f37.tar.bz2 |
Improve Behavior reliability.
Diffstat (limited to 'src/declarative/qml/qmlbinding.cpp')
-rw-r--r-- | src/declarative/qml/qmlbinding.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/declarative/qml/qmlbinding.cpp b/src/declarative/qml/qmlbinding.cpp index 3a34f46..907dcfa 100644 --- a/src/declarative/qml/qmlbinding.cpp +++ b/src/declarative/qml/qmlbinding.cpp @@ -97,7 +97,7 @@ QmlMetaProperty QmlBinding::property() const return d->bindingData()->property; } -void QmlBinding::update() +void QmlBinding::update(QmlMetaProperty::WriteFlags flags) { Q_D(QmlBinding); @@ -119,17 +119,17 @@ void QmlBinding::update() int idx = data->property.coreIndex(); Q_ASSERT(idx != -1); - void *a[1]; + QmlBinding *t = this; - a[0] = (void *)&t; - QMetaObject::metacall(data->property.object(), + int status = -1; + void *a[] = { &t, 0, &status, &flags }; + QMetaObject::metacall(data->property.object(), QMetaObject::WriteProperty, idx, a); } else { - QVariant value = this->value(); - data->property.write(value, QmlMetaProperty::Binding); + data->property.write(value, flags); } data->updating = false; @@ -146,17 +146,17 @@ void QmlBinding::valueChanged() update(); } -void QmlBinding::setEnabled(bool e) +void QmlBinding::setEnabled(bool e, QmlMetaProperty::WriteFlags flags) { Q_D(QmlBinding); d->bindingData()->enabled = e; setTrackChange(e); - QmlAbstractBinding::setEnabled(e); + QmlAbstractBinding::setEnabled(e, flags); if (e) { addToObject(d->bindingData()->property.object()); - update(); + update(flags); } else { removeFromObject(); } @@ -231,7 +231,7 @@ QString QmlAbstractBinding::expression() const return QLatin1String("<Unknown>"); } -void QmlAbstractBinding::setEnabled(bool e) +void QmlAbstractBinding::setEnabled(bool e, QmlMetaProperty::WriteFlags) { if (e) m_mePtr = 0; } |