aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmllint/data/used.qml
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2021-03-24 20:13:14 +0100
committerMaximilian Goldstein <max.goldstein@qt.io>2021-03-25 11:34:41 +0100
commiteb74d99d02f61007443bcdf83033b05d525326b8 (patch)
treee7d768e70b154daa9418aad3d3d3df138908c201 /tests/auto/qml/qmllint/data/used.qml
parent8fe127129b4f31e7e13dbf727687d98b95984763 (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 'tests/auto/qml/qmllint/data/used.qml')
-rw-r--r--tests/auto/qml/qmllint/data/used.qml12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/used.qml b/tests/auto/qml/qmllint/data/used.qml
new file mode 100644
index 0000000000..ebb5a4884f
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/used.qml
@@ -0,0 +1,12 @@
+import QtQml as Qml
+import QtQuick as Quick
+import QtQuick 2.0 as QuickLegacy
+import QtQuick
+
+Item {
+ property var bar: Qml.QtObject {}
+ Item {
+ property var foo: Quick.Screen.pixelDensity
+ property var foo2: parent.QuickLegacy.Screen.pixelDensity
+ }
+}