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>
This commit is contained in:
@@ -39,10 +39,16 @@ Effect {
|
||||
name: "Gamma"
|
||||
value: 0.5
|
||||
}
|
||||
onDataChanged: updateParameters()
|
||||
}
|
||||
|
||||
function updateParameters()
|
||||
{
|
||||
gamma = parameters.get(0).value;
|
||||
}
|
||||
|
||||
// Transform slider values, and bind result to shader uniforms
|
||||
property real gamma: parameters.get(0).value
|
||||
property real gamma: 0.5
|
||||
|
||||
property real numColors: 8.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user