From 6fcb1974c96ab37d51a3ade7eff4a2ecb9ba11fb Mon Sep 17 00:00:00 2001
From: Federico Brega <charon66@users.sourceforge.net>
Date: Mon, 12 Aug 2013 22:24:43 +0200
Subject: [PATCH] Fix demos and examples using on onCompleted signal of
 Animation

---
 demos/quick3d/robo_bounce/qml/PushButton.qml                   |    2 +-
 demos/quick3d/robo_bounce/qml/RoboBounce.qml                   |    8 ++++----
 demos/quick3d/tea_service/qml/TeaService.qml                   |    2 +-
 demos/quick3d/tea_service/qml/Teacup.qml                       |    2 +-
 demos/quick3d/tea_service/qml/Teaspoon.qml                     |    2 +-
 .../quick3d/positional_lighting/qml/PositionalLighting.qml     |    4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/demos/quick3d/robo_bounce/qml/PushButton.qml b/demos/quick3d/robo_bounce/qml/PushButton.qml
index 1da9d5b..7948374 100644
--- a/demos/quick3d/robo_bounce/qml/PushButton.qml
+++ b/demos/quick3d/robo_bounce/qml/PushButton.qml
@@ -55,7 +55,7 @@ Image {
         running: theButton.bounce && Qt.application.active
         NumberAnimation {target: theButton; property: "scale"; duration: 50; to: 0.8;}
         NumberAnimation {target: theButton; property: "scale"; duration: 50; to: 1;}
-        onCompleted: {theButton.bounce = false}
+        onStopped: {theButton.bounce = false}
     }
 
     MouseArea {
diff --git a/demos/quick3d/robo_bounce/qml/RoboBounce.qml b/demos/quick3d/robo_bounce/qml/RoboBounce.qml
index 670197c..a0f6d09 100644
--- a/demos/quick3d/robo_bounce/qml/RoboBounce.qml
+++ b/demos/quick3d/robo_bounce/qml/RoboBounce.qml
@@ -269,7 +269,7 @@ Image {
                     NumberAnimation {target: roboInfo; property: "opacity"; to: 0.7; duration: 500}
                     PauseAnimation {duration: 3000}
                     NumberAnimation {target: roboInfo; property: "opacity"; to: 0.0; duration: 500}
-                    onCompleted: {roboInfo.showVisible=false}
+                    onStopped: {roboInfo.showVisible=false}
                 }
             }
 
@@ -291,7 +291,7 @@ Image {
                     running: qt3dButton.bounce && Qt.application.active
                     NumberAnimation {target: qt3dButton; property: "scale"; duration: 100; to: 1.2;}
                     NumberAnimation {target: qt3dButton; property: "scale"; duration: 100; to: 1;}
-                    onCompleted: {qt3dButton.bounce = false}
+                    onStopped: {qt3dButton.bounce = false}
                 }
 
                 MouseArea {
@@ -439,7 +439,7 @@ Image {
                         to: 360
                         duration: 3000
                         easing.type: "InOutQuad"
-                        onCompleted: {
+                        onStopped: {
                             room.spinning=false
                             roomSpin.angle=0
                         }
@@ -462,7 +462,7 @@ Image {
 
                         SequentialAnimation {
                             running: smallCube.fallingCubeAnimation && Qt.application.active
-                            onCompleted: {smallCube.fallingCubeAnimation=false;}
+                            onStopped: {smallCube.fallingCubeAnimation=false;}
                             ParallelAnimation {
                                 NumberAnimation {target: spinSmallCube; property: "angle"; to: 360; easing.type: "InOutQuad"; duration: 1750}
                                 SequentialAnimation {
diff --git a/demos/quick3d/tea_service/qml/TeaService.qml b/demos/quick3d/tea_service/qml/TeaService.qml
index b3ac1da..d13345f 100644
--- a/demos/quick3d/tea_service/qml/TeaService.qml
+++ b/demos/quick3d/tea_service/qml/TeaService.qml
@@ -150,7 +150,7 @@ Viewport {
             running: teapot.bounce && Qt.application.active
             NumberAnimation { to : 1.0; duration: 300; easing.type: "OutQuad" }
             NumberAnimation { to : 0.0; duration: 300; easing.type: "OutBounce" }
-            onCompleted: teapot.bounce = false
+            onStopped: teapot.bounce = false
         }
 
         states: [
diff --git a/demos/quick3d/tea_service/qml/Teacup.qml b/demos/quick3d/tea_service/qml/Teacup.qml
index 5fb2fb8..23e7fa8 100644
--- a/demos/quick3d/tea_service/qml/Teacup.qml
+++ b/demos/quick3d/tea_service/qml/Teacup.qml
@@ -62,6 +62,6 @@ Item3D {
         running: top.bounce
         NumberAnimation { to : 1; duration: 300; easing.type:"OutQuad" }
         NumberAnimation { to : 0; duration: 300; easing.type:"OutBounce" }
-        onCompleted: top.bounce = false
+        onStopped: top.bounce = false
     }
 }
diff --git a/demos/quick3d/tea_service/qml/Teaspoon.qml b/demos/quick3d/tea_service/qml/Teaspoon.qml
index f4af9a8..c9fd038 100644
--- a/demos/quick3d/tea_service/qml/Teaspoon.qml
+++ b/demos/quick3d/tea_service/qml/Teaspoon.qml
@@ -65,7 +65,7 @@ Item3D {
             running: teaspoon1.bounce
             NumberAnimation { to : 1; duration: 300; easing.type:"OutQuad" }
             NumberAnimation { to : 0; duration: 300; easing.type:"OutBounce" }
-            onCompleted: teaspoon1.bounce = false
+            onStopped: teaspoon1.bounce = false
         }
     }
 }
diff --git a/examples/quick3d/positional_lighting/qml/PositionalLighting.qml b/examples/quick3d/positional_lighting/qml/PositionalLighting.qml
index 5b9e8fc..7e0e0d2 100644
--- a/examples/quick3d/positional_lighting/qml/PositionalLighting.qml
+++ b/examples/quick3d/positional_lighting/qml/PositionalLighting.qml
@@ -117,7 +117,7 @@ Viewport  {
                     to: maze.zDestination;
                 }
                 // It seems like we need this indirection to load the new values
-                onCompleted: maze.calculateNewLightDestination()
+                onStopped: maze.calculateNewLightDestination()
             }
         }
 
@@ -135,7 +135,7 @@ Viewport  {
         from: 0
         to: lightPulse.upperBound
         duration: 1500
-        onCompleted: lightPulse.running = true;
+        onStopped: lightPulse.running = true;
     }
 
     // Animating the lighting attenuation to make the light pulse.
-- 
1.7.10.4

