aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlimport/data/QTBUG-77102
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2019-07-18 16:06:26 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2019-07-23 16:38:07 +0200
commitd94dd247ecd6753150dc2a7ef6be4ccb482e9423 (patch)
tree198ab0b2ae3aa7ee4476dcf849e005dc7065e35d /tests/auto/qml/qqmlimport/data/QTBUG-77102
parent1dad2029a5bdbc40b244f72f995d70d27ed98e62 (diff)
Do not search for Singletons from more recent versions
This would break importing older versions of a module, as we would try to locate a singleton which does not exist in this version. Fixes: QTBUG-77102 Change-Id: I78be1ec111d2be26a14b2a94bbf743cf6238cddd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlimport/data/QTBUG-77102')
-rw-r--r--tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/MyComponent_0_9.qml14
-rw-r--r--tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/MyComponent_1_0.qml15
-rw-r--r--tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/MySettings_1_0.qml7
-rw-r--r--tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/qmldir6
-rw-r--r--tests/auto/qml/qqmlimport/data/QTBUG-77102/main.0.9.fail.qml11
-rw-r--r--tests/auto/qml/qqmlimport/data/QTBUG-77102/main.0.9.qml11
-rw-r--r--tests/auto/qml/qqmlimport/data/QTBUG-77102/main.1.0.qml11
-rw-r--r--tests/auto/qml/qqmlimport/data/QTBUG-77102/main.nonumber.qml11
8 files changed, 86 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/MyComponent_0_9.qml b/tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/MyComponent_0_9.qml
new file mode 100644
index 0000000000..a63e2d121c
--- /dev/null
+++ b/tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/MyComponent_0_9.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 50
+ height: 50
+
+ color: "yellow"
+
+ Text {
+ anchors.centerIn: parent
+ text: "0.9"
+
+ }
+}
diff --git a/tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/MyComponent_1_0.qml b/tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/MyComponent_1_0.qml
new file mode 100644
index 0000000000..d9cff582bb
--- /dev/null
+++ b/tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/MyComponent_1_0.qml
@@ -0,0 +1,15 @@
+
+import QtQuick 2.0
+
+Rectangle {
+ width: 50
+ height: 50
+
+ color: "orange"
+
+ Text {
+ anchors.centerIn: parent
+ text: "1.0"
+
+ }
+}
diff --git a/tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/MySettings_1_0.qml b/tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/MySettings_1_0.qml
new file mode 100644
index 0000000000..63ad6ba1a5
--- /dev/null
+++ b/tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/MySettings_1_0.qml
@@ -0,0 +1,7 @@
+pragma Singleton
+
+import QtQuick 2.0
+
+Item {
+ property int baseWidth: 50
+}
diff --git a/tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/qmldir b/tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/qmldir
new file mode 100644
index 0000000000..57b8c55f81
--- /dev/null
+++ b/tests/auto/qml/qqmlimport/data/QTBUG-77102/imports/MyPlugin/qmldir
@@ -0,0 +1,6 @@
+module MyPlugin
+
+MyComponent 0.9 MyComponent_0_9.qml
+
+MyComponent 1.0 MyComponent_1_0.qml
+singleton MySettings 1.0 MySettings_1_0.qml
diff --git a/tests/auto/qml/qqmlimport/data/QTBUG-77102/main.0.9.fail.qml b/tests/auto/qml/qqmlimport/data/QTBUG-77102/main.0.9.fail.qml
new file mode 100644
index 0000000000..0fbcec607a
--- /dev/null
+++ b/tests/auto/qml/qqmlimport/data/QTBUG-77102/main.0.9.fail.qml
@@ -0,0 +1,11 @@
+import QtQuick 2.12
+import MyPlugin 0.9
+
+Item {
+ width: MySettings.baseWidth
+ height: 100
+
+ MyComponent {
+ anchors.centerIn: parent
+ }
+}
diff --git a/tests/auto/qml/qqmlimport/data/QTBUG-77102/main.0.9.qml b/tests/auto/qml/qqmlimport/data/QTBUG-77102/main.0.9.qml
new file mode 100644
index 0000000000..53fc25699c
--- /dev/null
+++ b/tests/auto/qml/qqmlimport/data/QTBUG-77102/main.0.9.qml
@@ -0,0 +1,11 @@
+import QtQuick 2.12
+import MyPlugin 0.9
+
+Item {
+ width: 100
+ height: 100
+
+ MyComponent {
+ anchors.centerIn: parent
+ }
+}
diff --git a/tests/auto/qml/qqmlimport/data/QTBUG-77102/main.1.0.qml b/tests/auto/qml/qqmlimport/data/QTBUG-77102/main.1.0.qml
new file mode 100644
index 0000000000..1f6244068b
--- /dev/null
+++ b/tests/auto/qml/qqmlimport/data/QTBUG-77102/main.1.0.qml
@@ -0,0 +1,11 @@
+import QtQuick 2.12
+import MyPlugin 1.0
+
+Item {
+ width: MySettings.baseWidth
+ height: 100
+
+ MyComponent {
+ anchors.centerIn: parent
+ }
+}
diff --git a/tests/auto/qml/qqmlimport/data/QTBUG-77102/main.nonumber.qml b/tests/auto/qml/qqmlimport/data/QTBUG-77102/main.nonumber.qml
new file mode 100644
index 0000000000..dea00c0163
--- /dev/null
+++ b/tests/auto/qml/qqmlimport/data/QTBUG-77102/main.nonumber.qml
@@ -0,0 +1,11 @@
+import QtQuick 2.12
+import "imports/MyPlugin"
+
+Item {
+ width: MySettings.baseWidth
+ height: 100
+
+ MyComponent {
+ anchors.centerIn: parent
+ }
+}