aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2021-08-10 12:50:47 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-12 13:25:46 +0000
commitfa9676178301a8ffdf0627444e87a5940127a965 (patch)
tree2d69b8d250d4eb9b895f9e4854832cf0faa6b3bd /tests
parent090fa08c60dcb8b3a7c135dda28d3ac5e7d28489 (diff)
qmllint: Process qmldir when importing directories
Now qmllint also imports qmldirs when importing directories (also applies to implicit importing of the current directory). This matches the behavior of qml itself now. Fixes: QTBUG-95656 Change-Id: I58c3b8c13c1d06e3d146c9de298a3e02d8dffa28 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit dfdc5cba89f8df2a8a9dd5a54072734f212f8772) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qmllint/data/Things/LintDirectly.qml4
-rw-r--r--tests/auto/qml/qmllint/data/Things/NotPartOfThings.qml3
-rw-r--r--tests/auto/qml/qmllint/tst_qmllint.cpp1
3 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/Things/LintDirectly.qml b/tests/auto/qml/qmllint/data/Things/LintDirectly.qml
new file mode 100644
index 0000000000..4384fa99f4
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/Things/LintDirectly.qml
@@ -0,0 +1,4 @@
+Pane {
+ property var thing: NotPartOfThings {}
+ property var something: Something {}
+}
diff --git a/tests/auto/qml/qmllint/data/Things/NotPartOfThings.qml b/tests/auto/qml/qmllint/data/Things/NotPartOfThings.qml
new file mode 100644
index 0000000000..16fd397d1d
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/Things/NotPartOfThings.qml
@@ -0,0 +1,3 @@
+import QtQuick
+
+Component {}
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index 79225d92de..8a54fa074f 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -765,6 +765,7 @@ void TestQmllint::cleanQmlCode_data()
QTest::newRow("CustomParserUnqualifiedAccess")
<< QStringLiteral("customParserUnqualifiedAccess.qml");
QTest::newRow("ImportQMLModule") << QStringLiteral("importQMLModule.qml");
+ QTest::newRow("ImportDirectoryQmldir") << QStringLiteral("Things/LintDirectly.qml");
}
void TestQmllint::cleanQmlCode()