diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-01-20 12:17:42 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-01-20 13:33:52 +0100 |
commit | 3ae2a6a47c960d159e1110b434795fc69ecf3d80 (patch) | |
tree | bb703e7dc88eaedb2ac064a345008295eec20fd2 /tools | |
parent | bf573ad295fbc1eee9379bfaafcded293c4b81f4 (diff) |
qmllint: Support extended types
Fixes: QTBUG-90448
Change-Id: I5fb6b3d9223ae95ca7e039c5b9139ed086052c29
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmllint/checkidentifiers.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/qmllint/checkidentifiers.cpp b/tools/qmllint/checkidentifiers.cpp index b718f0f691..90456f97aa 100644 --- a/tools/qmllint/checkidentifiers.cpp +++ b/tools/qmllint/checkidentifiers.cpp @@ -86,6 +86,12 @@ static bool walkViaParentAndAttachedScopes(QQmlJSScope::ConstPtr rootType, return false; std::stack<QQmlJSScope::ConstPtr> stack; stack.push(rootType); + + if (!rootType->isComposite()) { + if (auto extension = rootType->extensionType()) + stack.push(extension); + } + while (!stack.empty()) { const auto type = stack.top(); stack.pop(); @@ -93,8 +99,13 @@ static bool walkViaParentAndAttachedScopes(QQmlJSScope::ConstPtr rootType, if (visit(type)) return true; - if (auto superType = type->baseType()) + if (auto superType = type->baseType()) { stack.push(superType); + if (type->isComposite() && !superType->isComposite()) { + if (auto extension = superType->extensionType()) + stack.push(extension); + } + } if (auto attachedType = type->attachedType()) stack.push(attachedType); |