summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorOliver Eftevaag <oliver.eftevaag@qt.io>2023-03-23 17:29:50 +0100
committerOliver Eftevaag <oliver.eftevaag@qt.io>2023-04-19 20:01:08 +0200
commit8b856a7d0882c12f07f699676c93d5be0910feb5 (patch)
tree7d34a85045fbc5b2f2c413ac8095bbb1d6094972 /examples
parent482d6035a4f66aec5a3f52e12858486a2ee83cba (diff)
downloadqtdeclarative-8b856a7d0882c12f07f699676c93d5be0910feb5.tar.gz
Remove qmllint warnings in particle emitters example
Pick-to: 6.5 Change-Id: Ibdf9bb196454bcfa4c46d237aa69928d3bc9a7a4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/particles/emitters/customemitter.qml6
-rw-r--r--examples/quick/particles/emitters/velocityfrommotion.qml12
2 files changed, 7 insertions, 11 deletions
diff --git a/examples/quick/particles/emitters/customemitter.qml b/examples/quick/particles/emitters/customemitter.qml
index 5aba7d1b9f..ed23d68720 100644
--- a/examples/quick/particles/emitters/customemitter.qml
+++ b/examples/quick/particles/emitters/customemitter.qml
@@ -16,7 +16,7 @@ ParticleSystem {
}
property real petalLength: 180
- property real petalRotation: 0
+ property real petalRotation
NumberAnimation on petalRotation {
from: 0;
to: 360;
@@ -34,9 +34,9 @@ ParticleSystem {
//! [0]
onEmitParticles: (particles) => {
for (var i=0; i<particles.length; i++) {
- var particle = particles[i];
+ let particle = particles[i];
particle.startSize = Math.max(02,Math.min(492,Math.tan(particle.t/2)*24));
- var theta = Math.floor(Math.random() * 6.0);
+ let theta = Math.floor(Math.random() * 6.0);
particle.red = theta == 0 || theta == 1 || theta == 2 ? 0.2 : 1;
particle.green = theta == 2 || theta == 3 || theta == 4 ? 0.2 : 1;
particle.blue = theta == 4 || theta == 5 || theta == 0 ? 0.2 : 1;
diff --git a/examples/quick/particles/emitters/velocityfrommotion.qml b/examples/quick/particles/emitters/velocityfrommotion.qml
index df8070e768..aa65ac7d9e 100644
--- a/examples/quick/particles/emitters/velocityfrommotion.qml
+++ b/examples/quick/particles/emitters/velocityfrommotion.qml
@@ -25,7 +25,6 @@ Rectangle {
ImageParticle {
system: sys1
source: "qrc:///particleresources/glowdot.png"
- color: "cyan"
alpha: 0
SequentialAnimation on color {
loops: Animation.Infinite
@@ -73,7 +72,6 @@ Rectangle {
//! [0]
ParticleSystem { id: sys2 }
ImageParticle {
- color: "cyan"
system: sys2
alpha: 0
SequentialAnimation on color {
@@ -114,7 +112,6 @@ Rectangle {
ImageParticle {
source: "qrc:///particleresources/glowdot.png"
system: sys3
- color: "orange"
alpha: 0
SequentialAnimation on color {
loops: Animation.Infinite
@@ -155,7 +152,6 @@ Rectangle {
ImageParticle {
system: sys4
source: "qrc:///particleresources/star.png"
- color: "green"
alpha: 0
SequentialAnimation on color {
loops: Animation.Infinite
@@ -199,12 +195,12 @@ Rectangle {
Item {
id: circle
//anchors.fill: parent
- property real radius: 0
+ property real radius
property real dx: root.width / 2
property real dy: root.height / 2
property real cx: radius * Math.sin(percent*6.283185307179) + dx
property real cy: radius * Math.cos(percent*6.283185307179) + dy
- property real percent: 0
+ property real percent
SequentialAnimation on percent {
loops: Animation.Infinite
@@ -247,7 +243,7 @@ Rectangle {
property real dy: root.height / 2
property real cx: radius * Math.sin(percent*6.283185307179) + dx
property real cy: radius * Math.cos(percent*6.283185307179) + dy
- property real percent: 0
+ property real percent
SequentialAnimation on percent {
loops: Animation.Infinite
@@ -263,7 +259,7 @@ Rectangle {
property real dy: circle3.cy
property real cx: radius * Math.sin(percent*6.283185307179) + dx
property real cy: radius * Math.cos(percent*6.283185307179) + dy
- property real percent: 0
+ property real percent
SequentialAnimation on percent {
loops: Animation.Infinite