From 356acf16b894df9e1c1967b10f6f107facb62ab5 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 3 Sep 2020 12:52:06 +0200 Subject: [PATCH] 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 --- src/libs/qmljs/qmljscheck.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index 175ea0341df..92e1c1e59cf 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -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; }