Rename variable from metaProperty to property

This commit is contained in:
Kai Koehne
2010-04-22 14:58:49 +02:00
parent 75b0d84cab
commit a50371f214

View File

@@ -549,12 +549,12 @@ void ObjectNodeInstance::doResetProperty(const QString &propertyName)
{ {
m_modelAbstractPropertyHash.remove(propertyName); m_modelAbstractPropertyHash.remove(propertyName);
QDeclarativeProperty metaProperty(object(), propertyName, context()); QDeclarativeProperty property(object(), propertyName, context());
if (!metaProperty.isValid()) if (!property.isValid())
return; return;
QVariant oldValue = metaProperty.read(); QVariant oldValue = property.read();
if (oldValue.type() == QVariant::Url) { if (oldValue.type() == QVariant::Url) {
QUrl url = oldValue.toUrl(); QUrl url = oldValue.toUrl();
QString path = url.toLocalFile(); QString path = url.toLocalFile();
@@ -563,27 +563,27 @@ void ObjectNodeInstance::doResetProperty(const QString &propertyName)
} }
QDeclarativeAbstractBinding *binding = QDeclarativePropertyPrivate::binding(metaProperty); QDeclarativeAbstractBinding *binding = QDeclarativePropertyPrivate::binding(property);
if (binding) { if (binding) {
binding->setEnabled(false, 0); binding->setEnabled(false, 0);
binding->destroy(); binding->destroy();
} }
if (metaProperty.isResettable()) { if (property.isResettable()) {
metaProperty.reset(); property.reset();
} else if (metaProperty.propertyTypeCategory() == QDeclarativeProperty::List) { } else if (property.propertyTypeCategory() == QDeclarativeProperty::List) {
QDeclarativeListReference list = qvariant_cast<QDeclarativeListReference>(metaProperty.read()); QDeclarativeListReference list = qvariant_cast<QDeclarativeListReference>(property.read());
if (!hasFullImplementedListInterface(list)) { if (!hasFullImplementedListInterface(list)) {
qWarning() << "Property list interface not fully implemented for Class " << metaProperty.property().typeName() << " in property " << metaProperty.name() << "!"; qWarning() << "Property list interface not fully implemented for Class " << property.property().typeName() << " in property " << property.name() << "!";
return; return;
} }
list.clear(); list.clear();
} else if (metaProperty.isWritable()) { } else if (property.isWritable()) {
if (metaProperty.read() == resetValue(propertyName)) if (property.read() == resetValue(propertyName))
return; return;
metaProperty.write(resetValue(propertyName)); property.write(resetValue(propertyName));
} }
} }