From 90b4528b846542bfa6f0723487315140b9de17b4 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 17 Sep 2019 18:10:59 +0200 Subject: Avoid discouraged patterns in examples In particular, use required properties where applicable, explicitly import QtQml where we use it, avoid unqualified access into the root scope of a component, use JavaScript functions with explicit parameters as signal handlers. Change-Id: I3eaaba47cc3c7a2a12d488e36f9eec145cedbb0e Reviewed-by: Fabian Kosmale Reviewed-by: Shawn Rutledge --- examples/quick/particles/affectors/content/customaffector.qml | 4 ++-- examples/quick/particles/affectors/content/groupgoal.qml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/quick/particles/affectors') diff --git a/examples/quick/particles/affectors/content/customaffector.qml b/examples/quick/particles/affectors/content/customaffector.qml index 71646bcf39..6fabfb3ab2 100644 --- a/examples/quick/particles/affectors/content/customaffector.qml +++ b/examples/quick/particles/affectors/content/customaffector.qml @@ -81,7 +81,7 @@ Item { property real velocity: 1.5 width: parent.width height: parent.height - 100 - onAffectParticles: { + onAffectParticles: (particles, dt) => { /* //Linear movement if (particle.r == 0) { particle.r = Math.random() > 0.5 ? -1 : 1; @@ -117,7 +117,7 @@ Item { width: parent.width + 120 height: 100 anchors.bottom: parent.bottom - onAffectParticles: { + onAffectParticles: (particles, dt) => { for (var i=0; i