aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlvaluetypes/data
diff options
context:
space:
mode:
authorGlenn Watson <glenn.watson@nokia.com>2012-07-02 09:10:49 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-04 03:31:04 +0200
commitf18b66ac6cfc734d217ec9d44876774f25e5d900 (patch)
tree7d8dffc65886f87a88c76d1ec29adca00d23b167 /tests/auto/qml/qqmlvaluetypes/data
parentac9b09d4299bae22f6aa4b5423092167761d1c8d (diff)
Make Behaviors work correctly with value types.
When a value type is referenced by sub-component a grouped property is built. This code path did not handle behaviors being declared on the entire value type. Add support for value interceptors in this code path. Also issue an additional write to the value type property before calling the interceptor on components that are not being intercepted, so that the other sub-components don't get stale values during write back. Task-number: QTBUG-22625 Change-Id: I3365f422dfa1ab2e536e19575efcceceffb85e10 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmlvaluetypes/data')
-rw-r--r--tests/auto/qml/qqmlvaluetypes/data/grouped_interceptors_component.qml6
-rw-r--r--tests/auto/qml/qqmlvaluetypes/data/grouped_interceptors_ignore.qml6
-rw-r--r--tests/auto/qml/qqmlvaluetypes/data/grouped_interceptors_value.qml10
3 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlvaluetypes/data/grouped_interceptors_component.qml b/tests/auto/qml/qqmlvaluetypes/data/grouped_interceptors_component.qml
new file mode 100644
index 0000000000..7b8b587542
--- /dev/null
+++ b/tests/auto/qml/qqmlvaluetypes/data/grouped_interceptors_component.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyColorObject {
+ color: "#8000FF"
+ MyFloatSetInterceptor on color.r {}
+}
diff --git a/tests/auto/qml/qqmlvaluetypes/data/grouped_interceptors_ignore.qml b/tests/auto/qml/qqmlvaluetypes/data/grouped_interceptors_ignore.qml
new file mode 100644
index 0000000000..f1a498cb67
--- /dev/null
+++ b/tests/auto/qml/qqmlvaluetypes/data/grouped_interceptors_ignore.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyColorObject {
+ color: "#8000FF"
+ MyFloatIgnoreInterceptor on color.r {}
+}
diff --git a/tests/auto/qml/qqmlvaluetypes/data/grouped_interceptors_value.qml b/tests/auto/qml/qqmlvaluetypes/data/grouped_interceptors_value.qml
new file mode 100644
index 0000000000..1d6194c041
--- /dev/null
+++ b/tests/auto/qml/qqmlvaluetypes/data/grouped_interceptors_value.qml
@@ -0,0 +1,10 @@
+import Test 1.0
+
+MyColorObject {
+ color.r: 0.1
+ color.g: 0.2
+ color.b: 0.3
+ color.a: 0.4
+
+ MyColorInterceptor on color {}
+}