From 11de566dabcb1204dbaf96ee867d72d0952ccfa5 Mon Sep 17 00:00:00 2001 From: Sami Shalayel Date: Fri, 20 Sep 2024 14:23:07 +0200 Subject: [PATCH] qmllint: ignore custom parsed list bindings Amends 56c16d0e9770b39df142ba946357562be6b9731c that only ignores "normal" bindings from warnings in custom parsed contexts, and also ignore list bindings from custom parsed contexts. Pick-to: 6.8 6.7 6.5 Change-Id: I66538ddaac49686a5ad6b6560ddbdbd50bebb717 Reviewed-by: Ulf Hermann --- src/qmlcompiler/qqmljsimportvisitor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qmlcompiler/qqmljsimportvisitor.cpp b/src/qmlcompiler/qqmljsimportvisitor.cpp index cb5abd5d7e..26b5348f21 100644 --- a/src/qmlcompiler/qqmljsimportvisitor.cpp +++ b/src/qmlcompiler/qqmljsimportvisitor.cpp @@ -2220,6 +2220,12 @@ void QQmlJSImportVisitor::endVisit(UiArrayBinding *arrayBinding) const auto propertyName = getScopeName(m_currentScope, QQmlSA::ScopeType::QMLScope); leaveEnvironment(); + if (m_currentScope->isInCustomParserParent()) { + // These warnings do not apply for custom parsers and their children and need to be handled + // on a case by case basis + return; + } + qsizetype i = 0; for (auto element = arrayBinding->members; element; element = element->next, ++i) { const auto &type = children[i];