aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcachegen/Enums.qml
diff options
context:
space:
mode:
authorMichael Brasser <mbrasser@ford.com>2018-05-22 14:07:14 -0500
committerSimon Hausmann <simon.hausmann@qt.io>2018-05-23 08:00:41 +0000
commit1aecb24682075cbb99f21a367c399387b12257d0 (patch)
treea870380fb8fbddc4c2d63d201bef2d0d1717485b /tests/auto/qml/qmlcachegen/Enums.qml
parente50eeaf3a2cb1ec8d4d96b695245b86782284d81 (diff)
Ensure we restore QML-defined enums
This code path was previously missed, leading to some AOT-compiled types generating errors of the form: Unable to assign [undefined] to int [ChangeLog][QtQml] Fix QML declared enums with CONFIG+=qtquickcompiler. Change-Id: Ib46a2b2505aa3863f091a6ccdebf8425e62fc38f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcachegen/Enums.qml')
-rw-r--r--tests/auto/qml/qmlcachegen/Enums.qml9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcachegen/Enums.qml b/tests/auto/qml/qmlcachegen/Enums.qml
new file mode 100644
index 0000000000..830babb73e
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/Enums.qml
@@ -0,0 +1,9 @@
+import QtQml 2.0
+QtObject {
+ enum Test {
+ First = 100,
+ Second = 200
+ }
+ property int value: 0
+ Component.onCompleted: value = Enums.Second
+}