aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmllint
diff options
context:
space:
mode:
authorEvgeniy A. Dushistov <dushistov@mail.ru>2020-06-16 23:52:24 +0300
committerEvgeniy A. Dushistov <dushistov@mail.ru>2020-06-17 14:04:42 +0300
commit3615c72b666633cef9045012bbb05d5372c35cdf (patch)
tree8c6a456db529bd46e2bec9f6b23e0990c8e4fd2f /tests/auto/qml/qmllint
parent1b10ce6a08edbc2ac7e8fd7e97e3fc691f2081df (diff)
qmllint: fix wrong warning about enum usage
Fixes: QTBUG-83796 Change-Id: I635bbfd98cf7be8418b454626ba7725e92b71c2c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmllint')
-rw-r--r--tests/auto/qml/qmllint/data/EnumAccess1.qml9
-rw-r--r--tests/auto/qml/qmllint/data/EnumAccess2.qml9
-rw-r--r--tests/auto/qml/qmllint/tst_qmllint.cpp2
3 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/EnumAccess1.qml b/tests/auto/qml/qmllint/data/EnumAccess1.qml
new file mode 100644
index 0000000000..8392930b65
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/EnumAccess1.qml
@@ -0,0 +1,9 @@
+import QtQuick 2.0
+
+Item {
+ enum Status {
+ On, Off
+ }
+
+ property int status: EnumAccess1.Off
+}
diff --git a/tests/auto/qml/qmllint/data/EnumAccess2.qml b/tests/auto/qml/qmllint/data/EnumAccess2.qml
new file mode 100644
index 0000000000..9aa6e1bac8
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/EnumAccess2.qml
@@ -0,0 +1,9 @@
+import QtQuick 2.0
+
+Item {
+ enum Status {
+ On, Off
+ }
+
+ property int status: EnumAccess1.Status.Off
+}
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index bdb5cf37c0..2c7998b571 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -220,6 +220,8 @@ void TestQmllint::cleanQmlCode_data()
QTest::newRow("unknownBuiltinFont") << QStringLiteral("ButtonLoader.qml");
QTest::newRow("confusingImport") << QStringLiteral("Dialog.qml");
QTest::newRow("qualifiedAttached") << QStringLiteral("Drawer.qml");
+ QTest::newRow("EnumAccess1") << QStringLiteral("EnumAccess1.qml");
+ QTest::newRow("EnumAccess2") << QStringLiteral("EnumAccess2.qml");
}
void TestQmllint::cleanQmlCode()