diff options
author | Christian Kamm <[email protected]> | 2010-02-17 09:01:39 +0100 |
---|---|---|
committer | Christian Kamm <[email protected]> | 2010-02-17 09:01:39 +0100 |
commit | a0431f0563961f2d2d55a639eb08143f08f8c069 (patch) | |
tree | 4a7904044c7840942d284133c6d2e0e4cae909a0 /src/libs/qmljs/qmljscheck.cpp | |
parent | 4ab2272a89dc4122dce36ecdca2d99a3860fa068 (diff) |
Don't error for unknown property names inside ListElement for now.
Diffstat (limited to 'src/libs/qmljs/qmljscheck.cpp')
-rw-r--r-- | src/libs/qmljs/qmljscheck.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index 75759b26424..1ae028c8152 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -98,17 +98,29 @@ void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId, _context.setQmlScopeObject(scopeObject); #ifndef NO_DECLARATIVE_BACKEND - // check if the object has a Qt.PropertyChanges ancestor + // check if the object has a Qt.ListElement ancestor const ObjectValue *prototype = scopeObject->prototype(&_context); while (prototype) { if (const QmlObjectValue *qmlMetaObject = dynamic_cast<const QmlObjectValue *>(prototype)) { // ### Also check for Qt package. Involves changes in QmlObjectValue. - if (qmlMetaObject->qmlTypeName() == QLatin1String("PropertyChanges")) + if (qmlMetaObject->qmlTypeName() == QLatin1String("ListElement")) { + _allowAnyProperty = true; break; + } } prototype = prototype->prototype(&_context); } + // check if the object has a Qt.PropertyChanges ancestor + prototype = scopeObject->prototype(&_context); + while (prototype) { + if (const QmlObjectValue *qmlMetaObject = dynamic_cast<const QmlObjectValue *>(prototype)) { + // ### Also check for Qt package. Involves changes in QmlObjectValue. + if (qmlMetaObject->qmlTypeName() == QLatin1String("PropertyChanges")) + break; + } + prototype = prototype->prototype(&_context); + } // find the target script binding if (prototype && initializer) { for (UiObjectMemberList *m = initializer->members; m; m = m->next) { |