QmlJSCheck: Workaround for ListElement

When editing QML there are false positives reported
for ListElement.

Task-number: QDS-2602
Task-number: QDS-2716
Change-Id: If3fc297d6609213448f8353e9406b3f0aaf65870
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
This commit is contained in:
Thomas Hartmann
2020-09-03 12:52:06 +02:00
parent 6d7abca41f
commit 356acf16b8

View File

@@ -1835,7 +1835,10 @@ const Value *Check::checkScopeObjectMember(const UiQualifiedId *id)
if (value)
break;
}
if (!value) {
const bool isListElementScope = (!m_typeStack.isEmpty() && m_typeStack.last() == "ListElement");
if (!value && !isListElementScope) {
addMessage(ErrInvalidPropertyName, id->identifierToken, propertyName);
return nullptr;
}