Skip to content
Snippets Groups Projects
Commit a0431f05 authored by Christian Kamm's avatar Christian Kamm
Browse files

Don't error for unknown property names inside ListElement for now.

parent 4ab2272a
No related branches found
No related tags found
No related merge requests found
...@@ -98,17 +98,29 @@ void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId, ...@@ -98,17 +98,29 @@ void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId,
_context.setQmlScopeObject(scopeObject); _context.setQmlScopeObject(scopeObject);
#ifndef NO_DECLARATIVE_BACKEND #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); const ObjectValue *prototype = scopeObject->prototype(&_context);
while (prototype) { while (prototype) {
if (const QmlObjectValue *qmlMetaObject = dynamic_cast<const QmlObjectValue *>(prototype)) { if (const QmlObjectValue *qmlMetaObject = dynamic_cast<const QmlObjectValue *>(prototype)) {
// ### Also check for Qt package. Involves changes in QmlObjectValue. // ### Also check for Qt package. Involves changes in QmlObjectValue.
if (qmlMetaObject->qmlTypeName() == QLatin1String("PropertyChanges")) if (qmlMetaObject->qmlTypeName() == QLatin1String("ListElement")) {
_allowAnyProperty = true;
break; break;
}
} }
prototype = prototype->prototype(&_context); 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 // find the target script binding
if (prototype && initializer) { if (prototype && initializer) {
for (UiObjectMemberList *m = initializer->members; m; m = m->next) { for (UiObjectMemberList *m = initializer->members; m; m = m->next) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment