diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2021-03-24 20:13:14 +0100 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2021-03-25 11:34:41 +0100 |
commit | eb74d99d02f61007443bcdf83033b05d525326b8 (patch) | |
tree | e7d768e70b154daa9418aad3d3d3df138908c201 /src/qmlcompiler/qqmljsscope_p.h | |
parent | 8fe127129b4f31e7e13dbf727687d98b95984763 (diff) |
qmllint: Add support for warning about unused imports
qmllint will now show an information line pointing out import statements that are not needed.
It will not warn about imports that are redundant however, since there are legitimate reasons for having these.
Fixes: QTBUG-83237
Change-Id: I9588b5fa8a8efd37b48c9b349a448e580efb1452
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsscope_p.h')
-rw-r--r-- | src/qmlcompiler/qqmljsscope_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qmlcompiler/qqmljsscope_p.h b/src/qmlcompiler/qqmljsscope_p.h index 484f8ce1d3..80129296fe 100644 --- a/src/qmlcompiler/qqmljsscope_p.h +++ b/src/qmlcompiler/qqmljsscope_p.h @@ -270,7 +270,8 @@ public: } static void resolveTypes(const QQmlJSScope::Ptr &self, - const QHash<QString, ConstPtr> &contextualTypes); + const QHash<QString, ConstPtr> &contextualTypes, + QSet<QString> *usedTypes = nullptr); void setSourceLocation(const QQmlJS::SourceLocation &sourceLocation) { |