aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsimportvisitor.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2024-12-17 16:30:18 +0100
committerUlf Hermann <ulf.hermann@qt.io>2024-12-19 12:39:37 +0100
commitd5699c339c32228fc2d66edf84f3ca2a31a69a14 (patch)
tree6d1949c4902da398cd0c2ccabca32655dbce4162 /src/qmlcompiler/qqmljsimportvisitor.cpp
parent5e1fcb5ce33946800c054d25cad474f31d1a8695 (diff)
qmllint: Warn about bad binding owners only once
... rather than once per binding. Pick-to: 6.9 6.8 Task-number: QTBUG-127691 Change-Id: I632d3001138db1452119e5b97993c31c9a49638c Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsimportvisitor.cpp')
-rw-r--r--src/qmlcompiler/qqmljsimportvisitor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qmlcompiler/qqmljsimportvisitor.cpp b/src/qmlcompiler/qqmljsimportvisitor.cpp
index f3d59858b8..bb2c3b7750 100644
--- a/src/qmlcompiler/qqmljsimportvisitor.cpp
+++ b/src/qmlcompiler/qqmljsimportvisitor.cpp
@@ -548,11 +548,12 @@ QVector<QQmlJSAnnotation> QQmlJSImportVisitor::parseAnnotations(QQmlJS::AST::UiA
void QQmlJSImportVisitor::setAllBindings()
{
+ QDuplicateTracker<QQmlJSScope::ConstPtr> seenBadOwners;
for (auto it = m_bindings.cbegin(); it != m_bindings.cend(); ++it) {
// ensure the scope is resolved, if not - it is an error
auto type = it->owner;
- if (!type->isFullyResolved()) {
- if (!type->isInCustomParserParent()) { // special otherwise
+ if (!type->isFullyResolved() && !type->isInCustomParserParent()) { // special otherwise
+ if (!seenBadOwners.hasSeen(type)) {
m_logger->log(QStringLiteral("'%1' is used but it is not resolved")
.arg(getScopeName(type, type->scopeType())),
qmlUnresolvedType, type->sourceLocation());