diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2011-05-24 11:50:10 +0200 |
---|---|---|
committer | Fawzi Mohamed <fawzi.mohamed@nokia.com> | 2011-05-24 11:55:03 +0200 |
commit | d67b7d17dcec2683c10cf3df1b97bfee3d9ab568 (patch) | |
tree | 57570acc0c1287915ea854d0dfffd3039ae7c753 /src/plugins | |
parent | 4bd6bb4d55e6ab9bb2389dcbbd5ec6e96d2c0adc (diff) | |
download | qt-creator-d67b7d17dcec2683c10cf3df1b97bfee3d9ab568.tar.gz |
QmlJS: Refactor ObjectValue members.
* property -> lookupMember
* setProperty -> setMember
* removeProperty -> removeMember
Change-Id: I638479ee2b90b684283e714630bdcab237f6b3f2
Done-with: Fawzi Mohamed
Reviewed-on: http://codereview.qt.nokia.com/77
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
Diffstat (limited to 'src/plugins')
4 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp index 023da06b2b..f3b64acce7 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp @@ -192,7 +192,7 @@ QList<PropertyInfo> getQmlTypes(const Interpreter::QmlObjectValue *ov, LookupCon QString name = property.first; if (!ov->isWritable(name) && ov->isPointer(name)) { //dot property - const Interpreter::QmlObjectValue * qmlValue = dynamic_cast<const Interpreter::QmlObjectValue *>(ov->property(name, context->context())); + const Interpreter::QmlObjectValue * qmlValue = dynamic_cast<const Interpreter::QmlObjectValue *>(ov->lookupMember(name, context->context())); if (qmlValue) { QList<PropertyInfo> dotProperties = getQmlTypes(qmlValue, context); foreach (const PropertyInfo &propertyInfo, dotProperties) { @@ -204,7 +204,7 @@ QList<PropertyInfo> getQmlTypes(const Interpreter::QmlObjectValue *ov, LookupCon } } if (isValueType(ov->propertyType(name))) { - const Interpreter::ObjectValue *dotObjectValue = dynamic_cast<const Interpreter::ObjectValue *>(ov->property(name, context->context())); + const Interpreter::ObjectValue *dotObjectValue = dynamic_cast<const Interpreter::ObjectValue *>(ov->lookupMember(name, context->context())); if (dotObjectValue) { QList<PropertyInfo> dotProperties = getObjectTypes(dotObjectValue, context); foreach (const PropertyInfo &propertyInfo, dotProperties) { diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index 41995bf2f8..6a9cf7bc2d 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -485,7 +485,7 @@ public: Interpreter::PrototypeIterator iter(containingObject, m_context); while (iter.hasNext()) { const Interpreter::ObjectValue *proto = iter.next(); - if (proto->property(name, m_context) == m_context->engine()->arrayPrototype()) + if (proto->lookupMember(name, m_context) == m_context->engine()->arrayPrototype()) return true; if (const Interpreter::QmlObjectValue *qmlIter = dynamic_cast<const Interpreter::QmlObjectValue *>(proto)) { if (qmlIter->isListProperty(name)) diff --git a/src/plugins/qmljseditor/qmljscompletionassist.cpp b/src/plugins/qmljseditor/qmljscompletionassist.cpp index 3bda6afd84..e02c635396 100644 --- a/src/plugins/qmljseditor/qmljscompletionassist.cpp +++ b/src/plugins/qmljseditor/qmljscompletionassist.cpp @@ -199,7 +199,7 @@ const Interpreter::Value *getPropertyValue(const Interpreter::ObjectValue *objec const Interpreter::Value *value = object; foreach (const QString &name, propertyNames) { if (const Interpreter::ObjectValue *objectValue = value->asObjectValue()) { - value = objectValue->property(name, context); + value = objectValue->lookupMember(name, context); if (!value) return 0; } else { diff --git a/src/plugins/qmljseditor/qmljsfindreferences.cpp b/src/plugins/qmljseditor/qmljsfindreferences.cpp index 89d9a6480a..57c120ad1b 100644 --- a/src/plugins/qmljseditor/qmljsfindreferences.cpp +++ b/src/plugins/qmljseditor/qmljsfindreferences.cpp @@ -238,10 +238,10 @@ private: if (!chain || !chain->document) return false; - if (chain->document->bind()->idEnvironment()->property(_name, _context)) + if (chain->document->bind()->idEnvironment()->lookupMember(_name, _context)) return chain->document->bind()->idEnvironment() == _scope; const ObjectValue *root = chain->document->bind()->rootObjectValue(); - if (root->property(_name, _context)) { + if (root->lookupMember(_name, _context)) { return check(root); } |