aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmllint/data
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-09-24 10:06:26 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-09-24 12:05:47 +0200
commit229b24370b880c60c0990e5a32beabc0a679ea00 (patch)
treee4f83fbfa4b9a89fad8823d0dc7d380665c9ec50 /tests/auto/qml/qmllint/data
parentdbb0d83779d09dca35f5ad6ee68a19f4e93eec1d (diff)
qmllint: Don't dump imported enums into the current scope
This bit of code has never fulfilled any discernable function. Enum access is done elsewhere. Add a test case to prove that access to enums from QtQml's plugins.qmltypes still works. Change-Id: I62fd6c1ec748c88205aa20367ee06d7a33502fa1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmllint/data')
-rw-r--r--tests/auto/qml/qmllint/data/badEnumFromQtQml.qml6
-rw-r--r--tests/auto/qml/qmllint/data/enumFromQtQml.qml8
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/badEnumFromQtQml.qml b/tests/auto/qml/qmllint/data/badEnumFromQtQml.qml
new file mode 100644
index 0000000000..896458d598
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/badEnumFromQtQml.qml
@@ -0,0 +1,6 @@
+import QtQml
+
+QtObject {
+ property int foo: Easing.Linear123
+}
+
diff --git a/tests/auto/qml/qmllint/data/enumFromQtQml.qml b/tests/auto/qml/qmllint/data/enumFromQtQml.qml
new file mode 100644
index 0000000000..e07789fffc
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/enumFromQtQml.qml
@@ -0,0 +1,8 @@
+import QtQml
+
+QtObject {
+ // Remarkably, Easing.Type.Linear is not allowed in QML
+ // This is in contrast to QML-declared enums. See EnumAccess2.qml
+ property int foo: Easing.Linear
+}
+