aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlconnections/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlconnections/data')
-rw-r--r--tests/auto/qml/qqmlconnections/data/bindings/connection-no-signal-name.qml (renamed from tests/auto/qml/qqmlconnections/data/connection-no-signal-name.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/bindings/connection-targetchange.qml (renamed from tests/auto/qml/qqmlconnections/data/connection-targetchange.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/bindings/connection-unknownsignals-ignored.qml (renamed from tests/auto/qml/qqmlconnections/data/connection-unknownsignals-ignored.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/bindings/connection-unknownsignals-notarget.qml (renamed from tests/auto/qml/qqmlconnections/data/connection-unknownsignals-notarget.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/bindings/connection-unknownsignals-parent.qml (renamed from tests/auto/qml/qqmlconnections/data/connection-unknownsignals-parent.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/bindings/connection-unknownsignals.qml (renamed from tests/auto/qml/qqmlconnections/data/connection-unknownsignals.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/bindings/disabled-at-start.qml (renamed from tests/auto/qml/qqmlconnections/data/disabled-at-start.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/bindings/override-proxy-type.qml (renamed from tests/auto/qml/qqmlconnections/data/override-proxy-type.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/bindings/rewriteError-global.qml (renamed from tests/auto/qml/qqmlconnections/data/rewriteError-global.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/bindings/rewriteError-unnamed.qml (renamed from tests/auto/qml/qqmlconnections/data/rewriteError-unnamed.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/bindings/singletontype-target.qml (renamed from tests/auto/qml/qqmlconnections/data/singletontype-target.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/bindings/test-connection-implicit.qml (renamed from tests/auto/qml/qqmlconnections/data/test-connection-implicit.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/bindings/test-connection.qml (renamed from tests/auto/qml/qqmlconnections/data/test-connection.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/bindings/trimming.qml (renamed from tests/auto/qml/qqmlconnections/data/trimming.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/connection-no-signal-name.qml15
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/connection-targetchange.qml25
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals-ignored.qml17
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals-notarget.qml9
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals-parent.qml8
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals.qml11
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/disabled-at-start.qml14
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/override-proxy-type.qml13
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/rewriteError-global.qml8
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/rewriteError-unnamed.qml8
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/singletontype-target.qml22
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/test-connection-implicit.qml9
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/test-connection.qml14
-rw-r--r--tests/auto/qml/qqmlconnections/data/functions/trimming.qml13
28 files changed, 186 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlconnections/data/connection-no-signal-name.qml b/tests/auto/qml/qqmlconnections/data/bindings/connection-no-signal-name.qml
index 462a9577ff..462a9577ff 100644
--- a/tests/auto/qml/qqmlconnections/data/connection-no-signal-name.qml
+++ b/tests/auto/qml/qqmlconnections/data/bindings/connection-no-signal-name.qml
diff --git a/tests/auto/qml/qqmlconnections/data/connection-targetchange.qml b/tests/auto/qml/qqmlconnections/data/bindings/connection-targetchange.qml
index 154c309c9c..154c309c9c 100644
--- a/tests/auto/qml/qqmlconnections/data/connection-targetchange.qml
+++ b/tests/auto/qml/qqmlconnections/data/bindings/connection-targetchange.qml
diff --git a/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-ignored.qml b/tests/auto/qml/qqmlconnections/data/bindings/connection-unknownsignals-ignored.qml
index 0780dd1509..0780dd1509 100644
--- a/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-ignored.qml
+++ b/tests/auto/qml/qqmlconnections/data/bindings/connection-unknownsignals-ignored.qml
diff --git a/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-notarget.qml b/tests/auto/qml/qqmlconnections/data/bindings/connection-unknownsignals-notarget.qml
index 3da3e0f5d1..3da3e0f5d1 100644
--- a/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-notarget.qml
+++ b/tests/auto/qml/qqmlconnections/data/bindings/connection-unknownsignals-notarget.qml
diff --git a/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-parent.qml b/tests/auto/qml/qqmlconnections/data/bindings/connection-unknownsignals-parent.qml
index 2c55215579..2c55215579 100644
--- a/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-parent.qml
+++ b/tests/auto/qml/qqmlconnections/data/bindings/connection-unknownsignals-parent.qml
diff --git a/tests/auto/qml/qqmlconnections/data/connection-unknownsignals.qml b/tests/auto/qml/qqmlconnections/data/bindings/connection-unknownsignals.qml
index a351016b4a..a351016b4a 100644
--- a/tests/auto/qml/qqmlconnections/data/connection-unknownsignals.qml
+++ b/tests/auto/qml/qqmlconnections/data/bindings/connection-unknownsignals.qml
diff --git a/tests/auto/qml/qqmlconnections/data/disabled-at-start.qml b/tests/auto/qml/qqmlconnections/data/bindings/disabled-at-start.qml
index 1a823f87f6..1a823f87f6 100644
--- a/tests/auto/qml/qqmlconnections/data/disabled-at-start.qml
+++ b/tests/auto/qml/qqmlconnections/data/bindings/disabled-at-start.qml
diff --git a/tests/auto/qml/qqmlconnections/data/override-proxy-type.qml b/tests/auto/qml/qqmlconnections/data/bindings/override-proxy-type.qml
index 80e459966b..80e459966b 100644
--- a/tests/auto/qml/qqmlconnections/data/override-proxy-type.qml
+++ b/tests/auto/qml/qqmlconnections/data/bindings/override-proxy-type.qml
diff --git a/tests/auto/qml/qqmlconnections/data/rewriteError-global.qml b/tests/auto/qml/qqmlconnections/data/bindings/rewriteError-global.qml
index 1d0b557069..1d0b557069 100644
--- a/tests/auto/qml/qqmlconnections/data/rewriteError-global.qml
+++ b/tests/auto/qml/qqmlconnections/data/bindings/rewriteError-global.qml
diff --git a/tests/auto/qml/qqmlconnections/data/rewriteError-unnamed.qml b/tests/auto/qml/qqmlconnections/data/bindings/rewriteError-unnamed.qml
index a4849e994b..a4849e994b 100644
--- a/tests/auto/qml/qqmlconnections/data/rewriteError-unnamed.qml
+++ b/tests/auto/qml/qqmlconnections/data/bindings/rewriteError-unnamed.qml
diff --git a/tests/auto/qml/qqmlconnections/data/singletontype-target.qml b/tests/auto/qml/qqmlconnections/data/bindings/singletontype-target.qml
index 7de488c2dd..7de488c2dd 100644
--- a/tests/auto/qml/qqmlconnections/data/singletontype-target.qml
+++ b/tests/auto/qml/qqmlconnections/data/bindings/singletontype-target.qml
diff --git a/tests/auto/qml/qqmlconnections/data/test-connection-implicit.qml b/tests/auto/qml/qqmlconnections/data/bindings/test-connection-implicit.qml
index d5aa0f102a..d5aa0f102a 100644
--- a/tests/auto/qml/qqmlconnections/data/test-connection-implicit.qml
+++ b/tests/auto/qml/qqmlconnections/data/bindings/test-connection-implicit.qml
diff --git a/tests/auto/qml/qqmlconnections/data/test-connection.qml b/tests/auto/qml/qqmlconnections/data/bindings/test-connection.qml
index f44cbc047f..f44cbc047f 100644
--- a/tests/auto/qml/qqmlconnections/data/test-connection.qml
+++ b/tests/auto/qml/qqmlconnections/data/bindings/test-connection.qml
diff --git a/tests/auto/qml/qqmlconnections/data/trimming.qml b/tests/auto/qml/qqmlconnections/data/bindings/trimming.qml
index 4c37eb22af..4c37eb22af 100644
--- a/tests/auto/qml/qqmlconnections/data/trimming.qml
+++ b/tests/auto/qml/qqmlconnections/data/bindings/trimming.qml
diff --git a/tests/auto/qml/qqmlconnections/data/functions/connection-no-signal-name.qml b/tests/auto/qml/qqmlconnections/data/functions/connection-no-signal-name.qml
new file mode 100644
index 0000000000..04cc36b3c5
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/connection-no-signal-name.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.4
+
+Item {
+ id: blaBlaBla
+ function hint() {
+ }
+
+ Connections {
+ //target: blaBlaBla
+ // function onHint() { hint() };
+ on: true
+ }
+}
+
+
diff --git a/tests/auto/qml/qqmlconnections/data/functions/connection-targetchange.qml b/tests/auto/qml/qqmlconnections/data/functions/connection-targetchange.qml
new file mode 100644
index 0000000000..692194e837
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/connection-targetchange.qml
@@ -0,0 +1,25 @@
+import QtQuick 2.0
+
+Item {
+ Component {
+ id: item1
+ Item {
+ objectName: "item1"
+ }
+ }
+ Component {
+ id: item2
+ Item {
+ objectName: "item2"
+ }
+ }
+ Loader {
+ id: loader
+ sourceComponent: item1
+ }
+ Connections {
+ objectName: "connections"
+ target: loader.item
+ function onWidthChanged() { loader.sourceComponent = item2 }
+ }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals-ignored.qml b/tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals-ignored.qml
new file mode 100644
index 0000000000..f70d8cdb15
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals-ignored.qml
@@ -0,0 +1,17 @@
+import QtQml 2.0
+
+QtObject {
+ id: root
+
+ property Connections c1: Connections {
+ target: root;
+ function onNotFooBar1() {}
+ ignoreUnknownSignals: true
+ }
+
+ property Connections c2: Connections {
+ objectName: "connections"
+ function onNotFooBar2() {}
+ ignoreUnknownSignals: true
+ }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals-notarget.qml b/tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals-notarget.qml
new file mode 100644
index 0000000000..7658728dd9
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals-notarget.qml
@@ -0,0 +1,9 @@
+import QtQml 2.0
+
+QtObject {
+ property Connections c1: Connections {
+ objectName: "connections"
+ target: null
+ function onNotFooBar() {}
+ }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals-parent.qml b/tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals-parent.qml
new file mode 100644
index 0000000000..ece76b0cf7
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals-parent.qml
@@ -0,0 +1,8 @@
+import QtQml 2.0
+
+QtObject {
+ property Connections c1: Connections {
+ objectName: "connections"
+ function onFooBar() {}
+ }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals.qml b/tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals.qml
new file mode 100644
index 0000000000..a198a724d0
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/connection-unknownsignals.qml
@@ -0,0 +1,11 @@
+import QtQml 2.0
+
+QtObject {
+ id: screen
+
+ property Connections c1: Connections {
+ objectName: "connections"
+ target: screen
+ function onFooBar() {}
+ }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/functions/disabled-at-start.qml b/tests/auto/qml/qqmlconnections/data/functions/disabled-at-start.qml
new file mode 100644
index 0000000000..981437fe8c
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/disabled-at-start.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.9
+
+Item {
+ id: root
+
+ property bool tested: false
+ signal testMe()
+
+ Connections {
+ target: root
+ enabled: false
+ function onTestMe() { root.tested = true; }
+ }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/functions/override-proxy-type.qml b/tests/auto/qml/qqmlconnections/data/functions/override-proxy-type.qml
new file mode 100644
index 0000000000..b83f0baa11
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/override-proxy-type.qml
@@ -0,0 +1,13 @@
+import QtQml 2.12
+import test.proxy 1.0
+
+Proxy {
+ property int testEnum: 0;
+ id: proxy
+ property Connections connections: Connections {
+ target: proxy
+ function onSomeSignal() { testEnum = Proxy.EnumValue }
+ }
+
+ Component.onCompleted: someSignal()
+}
diff --git a/tests/auto/qml/qqmlconnections/data/functions/rewriteError-global.qml b/tests/auto/qml/qqmlconnections/data/functions/rewriteError-global.qml
new file mode 100644
index 0000000000..de3154c431
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/rewriteError-global.qml
@@ -0,0 +1,8 @@
+import QtQml 2.0
+import Test 1.0
+
+TestObject {
+ property QtObject connection: Connections {
+ function onSignalWithGlobalName() { ran = true }
+ }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/functions/rewriteError-unnamed.qml b/tests/auto/qml/qqmlconnections/data/functions/rewriteError-unnamed.qml
new file mode 100644
index 0000000000..fa1d1b17d7
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/rewriteError-unnamed.qml
@@ -0,0 +1,8 @@
+import QtQuick 2.0
+import Test 1.0
+
+TestObject {
+ property QtObject connection: Connections {
+ function onUnnamedArgumentSignal() { ran = true }
+ }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/functions/singletontype-target.qml b/tests/auto/qml/qqmlconnections/data/functions/singletontype-target.qml
new file mode 100644
index 0000000000..935b610351
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/singletontype-target.qml
@@ -0,0 +1,22 @@
+import QtQml 2.0
+import MyTestSingletonType 1.0 as MyTestSingletonType
+
+QtObject {
+ id: rootObject
+ objectName: "rootObject"
+ property int newIntPropValue: 12
+
+ property int moduleIntPropChangedCount: 0
+ property int moduleOtherSignalCount: 0
+
+ function setModuleIntProp() {
+ MyTestSingletonType.Api.intProp = newIntPropValue;
+ newIntPropValue = newIntPropValue + 1;
+ }
+
+ property Connections c: Connections {
+ target: MyTestSingletonType.Api
+ function onIntPropChanged() { moduleIntPropChangedCount = moduleIntPropChangedCount + 1 }
+ function onOtherSignal() { moduleOtherSignalCount = moduleOtherSignalCount + 1 }
+ }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/functions/test-connection-implicit.qml b/tests/auto/qml/qqmlconnections/data/functions/test-connection-implicit.qml
new file mode 100644
index 0000000000..2ed5278636
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/test-connection-implicit.qml
@@ -0,0 +1,9 @@
+import QtQuick 2.0
+
+Item {
+ width: 50
+
+ property bool tested: false
+
+ Connections { function onWidthChanged() { tested = true } }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/functions/test-connection.qml b/tests/auto/qml/qqmlconnections/data/functions/test-connection.qml
new file mode 100644
index 0000000000..c706797ea4
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/test-connection.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+Item {
+ id: screen; width: 50
+
+ property bool tested: false
+ signal testMe
+
+ Connections {
+ objectName: "connections"
+ target: screen;
+ function onWidthChanged() { screen.tested = true }
+ }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/functions/trimming.qml b/tests/auto/qml/qqmlconnections/data/functions/trimming.qml
new file mode 100644
index 0000000000..7dfd673539
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/functions/trimming.qml
@@ -0,0 +1,13 @@
+import QtQml 2.0
+
+QtObject {
+ id: root
+
+ property string tested
+ signal testMe(int param1, string param2)
+
+ property Connections c: Connections {
+ target: root
+ function onTestMe(param1, param2) { root.tested = param2 + param1 }
+ }
+}