aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-03-16 12:15:10 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-03-16 14:57:13 +0100
commitafe20375bab3dea584c3b6c9bc5812da78f6618e (patch)
tree67d89d63dfbb968bd7e87246381fdf1b941833c7 /tests
parent3e57c56aa1d54ac4587284727ca9c952d33f3e43 (diff)
qmllint: Use fully qualified QML type names as superClass
Otherwise we miss subtleties such as Label vs. T.Label. Task-number: QTBUG-82817 Change-Id: Idc2131426b2fd96f279dab83292a348b9295d5c0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qmllint/data/Dialog.qml10
-rw-r--r--tests/auto/qml/qmllint/data/Text.qml6
-rw-r--r--tests/auto/qml/qmllint/tst_qmllint.cpp1
3 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/Dialog.qml b/tests/auto/qml/qmllint/data/Dialog.qml
new file mode 100644
index 0000000000..bde8eae18b
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/Dialog.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.12
+
+Item {
+ id: control
+ property Text header
+ header: Text {
+ font.bold: true
+ padding: 12
+ }
+}
diff --git a/tests/auto/qml/qmllint/data/Text.qml b/tests/auto/qml/qmllint/data/Text.qml
new file mode 100644
index 0000000000..130578d1e3
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/Text.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.12 as T
+
+T.Text {
+ id: control
+ text: "'ello"
+}
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index f1930d3caf..3e5237aebe 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -193,6 +193,7 @@ void TestQmllint::cleanQmlCode_data()
QTest::newRow("goodTypeAssertion") << QStringLiteral("goodTypeAssertion.qml");
QTest::newRow("AttachedProps") << QStringLiteral("AttachedProps.qml");
QTest::newRow("unknownBuiltinFont") << QStringLiteral("ButtonLoader.qml");
+ QTest::newRow("confusingImport") << QStringLiteral("Dialog.qml");
}
void TestQmllint::cleanQmlCode()