aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcachegen/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qmlcachegen/data')
-rw-r--r--tests/auto/qml/qmlcachegen/data/Enums.qml9
-rw-r--r--tests/auto/qml/qmlcachegen/data/componentInItem.qml15
-rw-r--r--tests/auto/qml/qmlcachegen/data/jsimport.qml6
-rw-r--r--tests/auto/qml/qmlcachegen/data/jsmoduleimport.qml6
-rw-r--r--tests/auto/qml/qmlcachegen/data/library.js4
-rw-r--r--tests/auto/qml/qmlcachegen/data/script.js6
-rw-r--r--tests/auto/qml/qmlcachegen/data/script.mjs4
-rw-r--r--tests/auto/qml/qmlcachegen/data/trickypaths.qml4
-rw-r--r--tests/auto/qml/qmlcachegen/data/umlaut.qml4
-rw-r--r--tests/auto/qml/qmlcachegen/data/versionStyleSuffix-1.2-core-yc.qml4
-rw-r--r--tests/auto/qml/qmlcachegen/data/versionStyleSuffix-1.2-more.qml4
-rw-r--r--tests/auto/qml/qmlcachegen/data/versionchecks.qml4
-rw-r--r--tests/auto/qml/qmlcachegen/data/worker.js3
-rw-r--r--tests/auto/qml/qmlcachegen/data/worker.qml12
14 files changed, 85 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcachegen/data/Enums.qml b/tests/auto/qml/qmlcachegen/data/Enums.qml
new file mode 100644
index 0000000000..830babb73e
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/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
+}
diff --git a/tests/auto/qml/qmlcachegen/data/componentInItem.qml b/tests/auto/qml/qmlcachegen/data/componentInItem.qml
new file mode 100644
index 0000000000..820b9fddcd
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/componentInItem.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.12
+
+Item {
+ Component {
+ Rectangle {
+ id: xxx
+ Text {
+ text: qsTr("&Undo")
+ }
+ Text {
+ text: qsTr("&Redo")
+ }
+ }
+ }
+}
diff --git a/tests/auto/qml/qmlcachegen/data/jsimport.qml b/tests/auto/qml/qmlcachegen/data/jsimport.qml
new file mode 100644
index 0000000000..9c40878e60
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/jsimport.qml
@@ -0,0 +1,6 @@
+import QtQml 2.0
+import "script.js" as Script
+
+QtObject {
+ property int value: Script.getter()
+}
diff --git a/tests/auto/qml/qmlcachegen/data/jsmoduleimport.qml b/tests/auto/qml/qmlcachegen/data/jsmoduleimport.qml
new file mode 100644
index 0000000000..c1fad7fee2
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/jsmoduleimport.qml
@@ -0,0 +1,6 @@
+import QtQml 2.0
+import "script.mjs" as Script
+
+QtObject {
+ property bool ok: Script.ok()
+}
diff --git a/tests/auto/qml/qmlcachegen/data/library.js b/tests/auto/qml/qmlcachegen/data/library.js
new file mode 100644
index 0000000000..51fb41dc23
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/library.js
@@ -0,0 +1,4 @@
+
+function getter() {
+ return 42;
+}
diff --git a/tests/auto/qml/qmlcachegen/data/script.js b/tests/auto/qml/qmlcachegen/data/script.js
new file mode 100644
index 0000000000..fa55f9069e
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/script.js
@@ -0,0 +1,6 @@
+
+.import "library.js" as Library
+
+function getter() {
+ return Library.getter()
+}
diff --git a/tests/auto/qml/qmlcachegen/data/script.mjs b/tests/auto/qml/qmlcachegen/data/script.mjs
new file mode 100644
index 0000000000..459c336125
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/script.mjs
@@ -0,0 +1,4 @@
+
+export function ok() {
+ return true
+}
diff --git a/tests/auto/qml/qmlcachegen/data/trickypaths.qml b/tests/auto/qml/qmlcachegen/data/trickypaths.qml
new file mode 100644
index 0000000000..0836808dc2
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/trickypaths.qml
@@ -0,0 +1,4 @@
+import QtQml 2.0
+QtObject {
+ property int success: 42
+}
diff --git a/tests/auto/qml/qmlcachegen/data/umlaut.qml b/tests/auto/qml/qmlcachegen/data/umlaut.qml
new file mode 100644
index 0000000000..0836808dc2
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/umlaut.qml
@@ -0,0 +1,4 @@
+import QtQml 2.0
+QtObject {
+ property int success: 42
+}
diff --git a/tests/auto/qml/qmlcachegen/data/versionStyleSuffix-1.2-core-yc.qml b/tests/auto/qml/qmlcachegen/data/versionStyleSuffix-1.2-core-yc.qml
new file mode 100644
index 0000000000..0836808dc2
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/versionStyleSuffix-1.2-core-yc.qml
@@ -0,0 +1,4 @@
+import QtQml 2.0
+QtObject {
+ property int success: 42
+}
diff --git a/tests/auto/qml/qmlcachegen/data/versionStyleSuffix-1.2-more.qml b/tests/auto/qml/qmlcachegen/data/versionStyleSuffix-1.2-more.qml
new file mode 100644
index 0000000000..0836808dc2
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/versionStyleSuffix-1.2-more.qml
@@ -0,0 +1,4 @@
+import QtQml 2.0
+QtObject {
+ property int success: 42
+}
diff --git a/tests/auto/qml/qmlcachegen/data/versionchecks.qml b/tests/auto/qml/qmlcachegen/data/versionchecks.qml
new file mode 100644
index 0000000000..77d67e7da4
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/versionchecks.qml
@@ -0,0 +1,4 @@
+import QtQml 2.0
+QtObject {
+ property bool ok: true
+}
diff --git a/tests/auto/qml/qmlcachegen/data/worker.js b/tests/auto/qml/qmlcachegen/data/worker.js
new file mode 100644
index 0000000000..dd2d0b843d
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/worker.js
@@ -0,0 +1,3 @@
+WorkerScript.onMessage = function(message) {
+ WorkerScript.sendMessage({ reply: message });
+}
diff --git a/tests/auto/qml/qmlcachegen/data/worker.qml b/tests/auto/qml/qmlcachegen/data/worker.qml
new file mode 100644
index 0000000000..1f1c9d1ac7
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/worker.qml
@@ -0,0 +1,12 @@
+import QtQml 2.0
+import QtQuick 2.0
+QtObject {
+ property bool success: false
+ property WorkerScript worker: WorkerScript {
+ source: "worker.js"
+ onMessage: {
+ success = true
+ }
+ }
+ Component.onCompleted: worker.sendMessage("Hello")
+}