summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@theqtcompany.com>2015-11-05 10:22:11 +0100
committerPaolo Angelelli <paolo.angelelli@theqtcompany.com>2015-11-06 09:32:41 +0000
commit1c7543a64072c07ca6d8741ae352e5f999f4c270 (patch)
tree63cbd5a1a2a1f6dcea973681f6f23329efb7502e /examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml
parent95bd9d58d8d37ddec8d37f5b35128689c0aa55a8 (diff)
Fix for disallowed property bindings in qml effect files
According to the documentation of ListModel.get, "The returned object is not guaranteed to remain valid. It should not be used in property bindings." So the property bindings have been removed, and a js function has been introduced to update the properties upon list change. Task-number: QTBUG-49221 Change-Id: Idaed746ca237198b52a3aff0234076331e1512c1 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml')
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml
index 4ccad8b58..4980b1ddf 100644
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml
+++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml
@@ -40,10 +40,16 @@ Effect {
name: "Extent"
value: 0.5
}
+ onDataChanged: updateParameters()
+ }
+
+ function updateParameters()
+ {
+ curlExtent = 1.0 - parameters.get(0).value;
}
// Transform slider values, and bind result to shader uniforms
- property real curlExtent: 1.0 - parameters.get(0).value
+ property real curlExtent: 0.5
fragmentShaderFilename: "pagecurl.fsh"
}