diff options
-rw-r--r-- | src/qml/qml/qqmlabstractbinding.cpp | 16 | ||||
-rw-r--r-- | src/qml/qml/qqmlabstractbinding_p.h | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlbinding.cpp | 8 | ||||
-rw-r--r-- | src/qml/qml/qqmlbinding_p.h | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlproperty.cpp | 22 | ||||
-rw-r--r-- | src/qml/qml/qqmlvaluetypeproxybinding.cpp | 8 | ||||
-rw-r--r-- | src/qml/qml/qqmlvaluetypeproxybinding_p.h | 6 |
9 files changed, 38 insertions, 38 deletions
diff --git a/src/qml/qml/qqmlabstractbinding.cpp b/src/qml/qml/qqmlabstractbinding.cpp index d0692987f8..fd5a72eff8 100644 --- a/src/qml/qml/qqmlabstractbinding.cpp +++ b/src/qml/qml/qqmlabstractbinding.cpp @@ -64,20 +64,20 @@ void QQmlAbstractBinding::addToObject() Q_ASSERT(!nextBinding()); Q_ASSERT(isAddedToObject() == false); - QObject *obj = object(); + QObject *obj = targetObject(); Q_ASSERT(obj); QQmlData *data = QQmlData::get(obj, true); int coreIndex; - if (QQmlPropertyData::decodeValueTypePropertyIndex(propertyIndex(), &coreIndex) != -1) { + if (QQmlPropertyData::decodeValueTypePropertyIndex(targetPropertyIndex(), &coreIndex) != -1) { // Value type // Find the value type proxy (if there is one) QQmlValueTypeProxyBinding *proxy = 0; if (data->hasBindingBit(coreIndex)) { QQmlAbstractBinding *b = data->bindings; - while (b && b->propertyIndex() != coreIndex) + while (b && b->targetPropertyIndex() != coreIndex) b = b->nextBinding(); Q_ASSERT(b && b->bindingType() == QQmlAbstractBinding::ValueTypeProxy); proxy = static_cast<QQmlValueTypeProxyBinding *>(b); @@ -86,8 +86,8 @@ void QQmlAbstractBinding::addToObject() if (!proxy) { proxy = new QQmlValueTypeProxyBinding(obj, coreIndex); - Q_ASSERT(proxy->propertyIndex() == coreIndex); - Q_ASSERT(proxy->object() == obj); + Q_ASSERT(proxy->targetPropertyIndex() == coreIndex); + Q_ASSERT(proxy->targetObject() == obj); proxy->addToObject(); } @@ -111,16 +111,16 @@ Remove the binding from the object. void QQmlAbstractBinding::removeFromObject() { if (isAddedToObject()) { - QObject *obj = object(); + QObject *obj = targetObject(); QQmlData *data = QQmlData::get(obj, false); Q_ASSERT(data); int coreIndex; - if (QQmlPropertyData::decodeValueTypePropertyIndex(propertyIndex(), &coreIndex) != -1) { + if (QQmlPropertyData::decodeValueTypePropertyIndex(targetPropertyIndex(), &coreIndex) != -1) { // Find the value type binding QQmlAbstractBinding *vtbinding = data->bindings; - while (vtbinding->propertyIndex() != coreIndex) { + while (vtbinding->targetPropertyIndex() != coreIndex) { vtbinding = vtbinding->nextBinding(); Q_ASSERT(vtbinding); } diff --git a/src/qml/qml/qqmlabstractbinding_p.h b/src/qml/qml/qqmlabstractbinding_p.h index b37ea26088..c7b9abc8f3 100644 --- a/src/qml/qml/qqmlabstractbinding_p.h +++ b/src/qml/qml/qqmlabstractbinding_p.h @@ -73,11 +73,11 @@ public: // Should return the encoded property index for the binding. Should return this value // even if the binding is not enabled or added to an object. // Encoding is: coreIndex | (valueTypeIndex << 16) - virtual int propertyIndex() const = 0; + virtual int targetPropertyIndex() const = 0; // 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 *object() const = 0; + virtual QObject *targetObject() const = 0; virtual void setEnabled(bool e, QQmlPropertyPrivate::WriteFlags f = QQmlPropertyPrivate::DontRemoveBinding) = 0; virtual void update(QQmlPropertyPrivate::WriteFlags = QQmlPropertyPrivate::DontRemoveBinding); diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp index c895663586..e021858509 100644 --- a/src/qml/qml/qqmlbinding.cpp +++ b/src/qml/qml/qqmlbinding.cpp @@ -161,7 +161,7 @@ void QQmlBinding::update(QQmlPropertyPrivate::WriteFlags flags) return; // Check that the target has not been deleted - if (QQmlData::wasDeleted(object())) + if (QQmlData::wasDeleted(targetObject())) return; QQmlEnginePrivate *ep = QQmlEnginePrivate::get(context()->engine); @@ -277,13 +277,13 @@ QString QQmlBinding::expression() const return v->toQStringNoThrow(); } -QObject *QQmlBinding::object() const +QObject *QQmlBinding::targetObject() const { if (m_coreObject.hasValue()) return m_coreObject.constValue()->target; else return *m_coreObject; } -int QQmlBinding::propertyIndex() const +int QQmlBinding::targetPropertyIndex() const { if (m_coreObject.hasValue()) return m_coreObject.constValue()->targetProperty; else return m_core.encodedIndex(); @@ -308,7 +308,7 @@ void QQmlBinding::setTarget(QObject *object, const QQmlPropertyData &core) QQmlProperty QQmlBinding::property() const { - return QQmlPropertyPrivate::restore(object(), m_core, 0); + return QQmlPropertyPrivate::restore(targetObject(), m_core, 0); } QT_END_NAMESPACE diff --git a/src/qml/qml/qqmlbinding_p.h b/src/qml/qml/qqmlbinding_p.h index ecd809ff27..1d833cc72e 100644 --- a/src/qml/qml/qqmlbinding_p.h +++ b/src/qml/qml/qqmlbinding_p.h @@ -86,8 +86,8 @@ public: virtual void setEnabled(bool, QQmlPropertyPrivate::WriteFlags flags = QQmlPropertyPrivate::DontRemoveBinding); virtual void retargetBinding(QObject *, int); virtual QString expression() const; - virtual QObject *object() const; - virtual int propertyIndex() const; + virtual QObject *targetObject() const; + virtual int targetPropertyIndex() const; virtual void update(QQmlPropertyPrivate::WriteFlags flags = QQmlPropertyPrivate::DontRemoveBinding); typedef int Identifier; diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 5bf8479e55..eb279d7a5a 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -816,10 +816,10 @@ void QQmlData::flushPendingBindingImpl(int coreIndex) // Find the binding QQmlAbstractBinding *b = bindings; - while (b && *b->m_mePtr && b->propertyIndex() != coreIndex) + while (b && *b->m_mePtr && b->targetPropertyIndex() != coreIndex) b = b->nextBinding(); - if (b && b->propertyIndex() == coreIndex) { + if (b && b->targetPropertyIndex() == coreIndex) { b->clear(); b->setEnabled(true, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index a1787f67fd..5a1dbdfab0 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -1187,9 +1187,9 @@ QQmlContextData *QQmlObjectCreator::finalize(QQmlInstantiationInterrupt &interru if (!b) continue; b->m_mePtr = 0; - QQmlData *data = QQmlData::get(b->object()); + QQmlData *data = QQmlData::get(b->targetObject()); Q_ASSERT(data); - data->clearPendingBindingBit(b->propertyIndex()); + data->clearPendingBindingBit(b->targetPropertyIndex()); b->setEnabled(true, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp index 3ab312036b..25be1b05c2 100644 --- a/src/qml/qml/qqmlproperty.cpp +++ b/src/qml/qml/qqmlproperty.cpp @@ -732,8 +732,8 @@ QQmlPropertyPrivate::setBinding(const QQmlProperty &that, // In the case that the new binding is provided, we must target the property it // is associated with. If we don't do this, retargetBinding() can fail. - QObject *object = newBinding->object(); - int pi = newBinding->propertyIndex(); + QObject *object = newBinding->targetObject(); + int pi = newBinding->targetPropertyIndex(); int core; int vt = QQmlPropertyData::decodeValueTypePropertyIndex(pi, &core); @@ -776,7 +776,7 @@ QQmlPropertyPrivate::binding(QObject *object, int coreIndex, int valueTypeIndex) return 0; QQmlAbstractBinding *binding = data->bindings; - while (binding && binding->propertyIndex() != coreIndex) + while (binding && binding->targetPropertyIndex() != coreIndex) binding = binding->nextBinding(); if (binding && valueTypeIndex != -1) { @@ -852,7 +852,7 @@ QQmlPropertyPrivate::setBinding(QObject *object, int coreIndex, int valueTypeInd if (data && data->hasBindingBit(coreIndex)) { binding = data->bindings; - while (binding && binding->propertyIndex() != coreIndex) + while (binding && binding->targetPropertyIndex() != coreIndex) binding = binding->nextBinding(); } @@ -869,11 +869,11 @@ QQmlPropertyPrivate::setBinding(QObject *object, int coreIndex, int valueTypeInd } if (newBinding) { - if (newBinding->propertyIndex() != index || newBinding->object() != object) + if (newBinding->targetPropertyIndex() != index || newBinding->targetObject() != object) newBinding->retargetBinding(object, index); - Q_ASSERT(newBinding->propertyIndex() == index); - Q_ASSERT(newBinding->object() == object); + Q_ASSERT(newBinding->targetPropertyIndex() == index); + Q_ASSERT(newBinding->targetObject() == object); newBinding->addToObject(); newBinding->setEnabled(true, flags); @@ -916,7 +916,7 @@ QQmlPropertyPrivate::setBindingNoEnable(QObject *object, int coreIndex, int valu if (data && data->hasBindingBit(coreIndex)) { binding = data->bindings; - while (binding && binding->propertyIndex() != coreIndex) + while (binding && binding->targetPropertyIndex() != coreIndex) binding = binding->nextBinding(); } @@ -931,11 +931,11 @@ QQmlPropertyPrivate::setBindingNoEnable(QObject *object, int coreIndex, int valu binding->removeFromObject(); if (newBinding) { - if (newBinding->propertyIndex() != index || newBinding->object() != object) + if (newBinding->targetPropertyIndex() != index || newBinding->targetObject() != object) newBinding->retargetBinding(object, index); - Q_ASSERT(newBinding->propertyIndex() == index); - Q_ASSERT(newBinding->object() == object); + Q_ASSERT(newBinding->targetPropertyIndex() == index); + Q_ASSERT(newBinding->targetObject() == object); newBinding->addToObject(); } diff --git a/src/qml/qml/qqmlvaluetypeproxybinding.cpp b/src/qml/qml/qqmlvaluetypeproxybinding.cpp index dbc3cec2e9..f0457d25e3 100644 --- a/src/qml/qml/qqmlvaluetypeproxybinding.cpp +++ b/src/qml/qml/qqmlvaluetypeproxybinding.cpp @@ -66,7 +66,7 @@ QQmlAbstractBinding *QQmlValueTypeProxyBinding::binding(int propertyIndex) { QQmlAbstractBinding *binding = m_bindings; - while (binding && binding->propertyIndex() != propertyIndex) + while (binding && binding->targetPropertyIndex() != propertyIndex) binding = binding->nextBinding(); return binding; @@ -81,7 +81,7 @@ void QQmlValueTypeProxyBinding::removeBindings(quint32 mask) QQmlAbstractBinding *lastBinding = 0; while (binding) { - int valueTypeIndex = QQmlPropertyData::decodeValueTypePropertyIndex(binding->propertyIndex()); + int valueTypeIndex = QQmlPropertyData::decodeValueTypePropertyIndex(binding->targetPropertyIndex()); if (valueTypeIndex != -1 && (mask & (1 << valueTypeIndex))) { QQmlAbstractBinding *remove = binding; binding = remove->nextBinding(); @@ -101,12 +101,12 @@ void QQmlValueTypeProxyBinding::removeBindings(quint32 mask) } } -int QQmlValueTypeProxyBinding::propertyIndex() const +int QQmlValueTypeProxyBinding::targetPropertyIndex() const { return m_index; } -QObject *QQmlValueTypeProxyBinding::object() const +QObject *QQmlValueTypeProxyBinding::targetObject() const { return m_object; } diff --git a/src/qml/qml/qqmlvaluetypeproxybinding_p.h b/src/qml/qml/qqmlvaluetypeproxybinding_p.h index 0ac9c62836..c73c944efd 100644 --- a/src/qml/qml/qqmlvaluetypeproxybinding_p.h +++ b/src/qml/qml/qqmlvaluetypeproxybinding_p.h @@ -54,12 +54,12 @@ class QQmlValueTypeProxyBinding : public QQmlAbstractBinding public: QQmlValueTypeProxyBinding(QObject *o, int coreIndex); - QQmlAbstractBinding *binding(int propertyIndex); + QQmlAbstractBinding *binding(int targetPropertyIndex); void removeBindings(quint32 mask); virtual void setEnabled(bool, QQmlPropertyPrivate::WriteFlags); - virtual int propertyIndex() const; - virtual QObject *object() const; + virtual int targetPropertyIndex() const; + virtual QObject *targetObject() const; protected: ~QQmlValueTypeProxyBinding(); |