diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2021-04-15 16:03:33 +0200 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2021-04-16 14:29:55 +0200 |
commit | d506b6360c9e63435f3b4e77c3317186f323e8ae (patch) | |
tree | 1abad948f762c488c3ce3e10b9e3057d2dbdb18a /tools | |
parent | 16b30313ad6d9421a75c228dcacf5e2f9ded29ed (diff) |
qmllint: Fix non-existent default property for Component
Before children of Component caused errors about a non-existing default property.
Task-number: QTBUG-92571
Change-Id: I702ea79cf18221c35be48a86c6da35e809de073f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmllint/findwarnings.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/qmllint/findwarnings.cpp b/tools/qmllint/findwarnings.cpp index dd7e3596af..27ede08dd2 100644 --- a/tools/qmllint/findwarnings.cpp +++ b/tools/qmllint/findwarnings.cpp @@ -151,6 +151,10 @@ void FindWarningVisitor::checkDefaultProperty(const QQmlJSScope::ConstPtr &scope scopeOfDefaultProperty = s.data(); break; } + + // If the parent scope is based on Component it can have any child element + if (s->internalName() == QStringLiteral("QQmlComponent")) + return; } if (defaultPropertyName.isEmpty()) { m_logger.log(QStringLiteral("Cannot assign to non-existent default property"), |