summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlmetaproperty.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-10-02 13:51:09 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-05 02:40:50 (GMT)
commit43d3c9127e36b8f3134a173736d63140b381899f (patch)
treea12bf4e273590f222975966dba0caa0a509feddd /src/declarative/qml/qmlmetaproperty.cpp
parent114adc64fe8deb7d59e608924355f64810f8fe64 (diff)
downloadQt-43d3c9127e36b8f3134a173736d63140b381899f.zip
Qt-43d3c9127e36b8f3134a173736d63140b381899f.tar.gz
Qt-43d3c9127e36b8f3134a173736d63140b381899f.tar.bz2
Fix test failures
Diffstat (limited to 'src/declarative/qml/qmlmetaproperty.cpp')
-rw-r--r--src/declarative/qml/qmlmetaproperty.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp
index 477377e..155b34a 100644
--- a/src/declarative/qml/qmlmetaproperty.cpp
+++ b/src/declarative/qml/qmlmetaproperty.cpp
@@ -564,14 +564,20 @@ QmlMetaProperty::setBinding(QmlAbstractBinding *newBinding) const
if (!isProperty() || (type() & Attached) || !d->object)
return 0;
- QmlDeclarativeData *data =
- QmlDeclarativeData::get(d->object, 0 != newBinding);
+ d->setBinding(d->object, d->core, newBinding);
+}
+
+QmlAbstractBinding *
+QmlMetaPropertyPrivate::setBinding(QObject *object, const QmlPropertyCache::Data &core,
+ QmlAbstractBinding *newBinding)
+{
+ QmlDeclarativeData *data = QmlDeclarativeData::get(object, 0 != newBinding);
- if (data && data->hasBindingBit(d->core.coreIndex)) {
+ if (data && data->hasBindingBit(core.coreIndex)) {
QmlAbstractBinding *binding = data->bindings;
while (binding) {
// ### This wont work for value types
- if (binding->propertyIndex() == d->core.coreIndex) {
+ if (binding->propertyIndex() == core.coreIndex) {
binding->setEnabled(false);
if (newBinding)
@@ -1124,7 +1130,7 @@ void QmlMetaProperty::restore(quint32 id, QObject *obj, QmlContext *ctxt)
d->core.load(p);
d->valueTypeCoreIdx = valueTypeIdx;
- d->valueTypePropType = p.userType();
+ d->valueTypePropType = p2.userType();
} else if (type & Property) {
QmlPropertyCache *cache = enginePrivate?enginePrivate->cache(obj):0;