aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-08 14:09:14 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-14 13:07:43 +0000
commitf136724f2cefe97fda13e942674a5e3677c8cd2e (patch)
tree5b37c876d470419204e5e4de2a143e4e8f0a3d6f /src/qml/qml/qqmlobjectcreator.cpp
parentb902f540cda4bb523297a7a5c59520be06f30a1a (diff)
Cleanup
Avoid re-using the same variable for different purposes, so just pull in the first use into the tight scope and the second "property" variable close to the loop it is used with. Change-Id: I3a325478f9e56413b65dea9c7e05566497fbc6cf Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index 9abd1859b7..29995e828d 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -654,7 +654,6 @@ void QQmlObjectCreator::setupBindings(const QBitArray &bindingsToSkip)
QQmlListProperty<void> savedList;
qSwap(_currentList, savedList);
- QQmlPropertyData *property = 0;
QQmlPropertyData *defaultProperty = _compiledObject->indexOfDefaultProperty != -1 ? _propertyCache->parent()->defaultProperty() : _propertyCache->defaultProperty();
QString id = stringAt(_compiledObject->idIndex);
@@ -688,17 +687,17 @@ void QQmlObjectCreator::setupBindings(const QBitArray &bindingsToSkip)
const QV4::CompiledData::Binding *binding = _compiledObject->bindingTable();
for (quint32 i = 0; i < _compiledObject->nBindings; ++i, ++binding) {
- property = binding->propertyNameIndex != 0 ? _propertyCache->property(stringAt(binding->propertyNameIndex), _qobject, context) : defaultProperty;
+ QQmlPropertyData *property = binding->propertyNameIndex != 0 ? _propertyCache->property(stringAt(binding->propertyNameIndex), _qobject, context) : defaultProperty;
if (property)
bindingSkipList |= (1 << property->coreIndex);
}
- property = 0;
proxy->removeBindings(bindingSkipList);
}
}
}
+ QQmlPropertyData *property = 0;
const QV4::CompiledData::Binding *binding = _compiledObject->bindingTable();
for (quint32 i = 0; i < _compiledObject->nBindings; ++i, ++binding) {