/*! Removes a collection of bindings, corresponding to the set bits in \a mask. */ void QQmlValueTypeProxyBinding::removeBindings(quint32 mask) { QQmlAbstractBinding *binding = m_bindings; QQmlAbstractBinding *lastBinding = 0; while (binding) { int valueTypeIndex = QQmlPropertyData::decodeValueTypePropertyIndex(binding->propertyIndex()); if (valueTypeIndex != -1 && (mask & (1 << valueTypeIndex))) { QQmlAbstractBinding *remove = binding; binding = remove->nextBinding(); if (lastBinding == 0) m_bindings = remove->nextBinding(); else lastBinding->setNextBinding(remove->nextBinding()); remove->setAddedToObject(false); remove->setNextBinding(0); remove->destroy(); } else { lastBinding = binding; binding = binding->nextBinding(); } } }
QQmlValueTypeProxyBinding::~QQmlValueTypeProxyBinding() { QQmlAbstractBinding *binding = m_bindings.data(); while (binding) { binding->setAddedToObject(false); binding = binding->nextBinding(); } }
QQmlValueTypeProxyBinding::~QQmlValueTypeProxyBinding() { QQmlAbstractBinding *binding = m_bindings; // This must be identical to the logic in QQmlData::destroyed() while (binding) { QQmlAbstractBinding *next = binding->nextBinding(); binding->setAddedToObject(false); binding->setNextBinding(0); binding->destroy(); binding = next; } }
/*! Removes a collection of bindings, corresponding to the set bits in \a mask. */ void QQmlValueTypeProxyBinding::removeBindings(quint32 mask) { QQmlAbstractBinding *binding = m_bindings.data(); QQmlAbstractBinding *lastBinding = 0; while (binding) { const int valueTypeIndex = binding->targetPropertyIndex().valueTypeIndex(); if (valueTypeIndex != -1 && (mask & (1 << valueTypeIndex))) { QQmlAbstractBinding *remove = binding; remove->setAddedToObject(false); binding = remove->nextBinding(); if (lastBinding == 0) m_bindings = remove->nextBinding(); else lastBinding->setNextBinding(remove->nextBinding()); } else { lastBinding = binding; binding = binding->nextBinding(); } } }