diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2021-04-26 17:08:42 +0200 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2021-04-27 09:35:47 +0200 |
commit | 077b8f8df437d1cfcf67b153dd4535c36786bdee (patch) | |
tree | 50dde6745b58f143a1d20f8baccb909f7ce2cdfe /tools | |
parent | facffe8e5715a7ef0a07d4b950f9433fc92d8882 (diff) |
qmltypes: Add information about QQmlCustomParser
Adds a macro called QML_CUSTOMPARSER which will result in a hasCustomParser flag to be set in qmltypes.
Also ensures qmllint does not warn about unknown properties when a class utilizes custom parsers.
Fixes: QTBUG-93027
Change-Id: I7559d79c9bf06a0a7a93f54370948f12d09dd64e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmllint/findwarnings.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/qmllint/findwarnings.cpp b/tools/qmllint/findwarnings.cpp index 51db82cbde..825baf1be1 100644 --- a/tools/qmllint/findwarnings.cpp +++ b/tools/qmllint/findwarnings.cpp @@ -287,6 +287,11 @@ bool FindWarningVisitor::visit(QQmlJS::AST::UiScriptBinding *uisb) } if (!qmlScope->hasProperty(name.toString())) { + // These warnings do not apply for custom parsers and need to be handled on a case by + // case basis + if (qmlScope->baseType()->hasCustomParser()) + return true; + // TODO: Can this be in a better suited category? m_logger.log( QStringLiteral("Binding assigned to \"%1\", but no property \"%1\" " |