summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2020-09-25 10:41:24 +0100
committerMike Krus <mike.krus@kdab.com>2020-09-25 11:57:54 +0100
commitbbecb4a4ffe06e7f96c108995bc5e75614eaa963 (patch)
tree677712233d56bdc9ec29a2be3380fcd8a0b78c81 /tests/manual
parent96e9d67e40f1410f41cd9bae401948f10e448893 (diff)
Fix animation not running
Previous fix for compile issue forgot to account for the fact that the data changes after being registered with the class. Change-Id: Ice5238221f190f758ec3f25d883c56877c185e1c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/animation-keyframe-simple/CMakeLists.txt2
-rw-r--r--tests/manual/animation-keyframe-simple/main.qml9
2 files changed, 6 insertions, 5 deletions
diff --git a/tests/manual/animation-keyframe-simple/CMakeLists.txt b/tests/manual/animation-keyframe-simple/CMakeLists.txt
index 2769f5fa0..b15ee1b9f 100644
--- a/tests/manual/animation-keyframe-simple/CMakeLists.txt
+++ b/tests/manual/animation-keyframe-simple/CMakeLists.txt
@@ -29,7 +29,7 @@ qt_add_resource(animation-keyframe-simple "main"
FILES
${main_resource_files}
)
-
+target_sources(animation-keyframe-simple PRIVATE ${main_resource_files})
#### Keys ignored in scope 1:.:.:animation-keyframe-simple.pro:<TRUE>:
# OTHER_FILES = "main.qml" "DefaultSceneEntity.qml"
diff --git a/tests/manual/animation-keyframe-simple/main.qml b/tests/manual/animation-keyframe-simple/main.qml
index 9246f2467..b75b99c54 100644
--- a/tests/manual/animation-keyframe-simple/main.qml
+++ b/tests/manual/animation-keyframe-simple/main.qml
@@ -77,14 +77,15 @@ DefaultSceneEntity {
ObjectPicker {
onClicked: {
if (animator.running == false) {
- animator.running = true;
+ animator.normalizedTime = 0
+ animator.running = true
} else {
switch (pick.button) {
case PickEvent.RightButton:
- animationClock.playbackRate *= 2.0;
+ animationClock.playbackRate *= 2.0
break;
case PickEvent.LeftButton:
- animationClock.playbackRate /= 2.0;
+ animationClock.playbackRate /= 2.0
break;
default:
break;
@@ -103,7 +104,7 @@ DefaultSceneEntity {
}
clip: AnimationClipLoader {
- source: "cubeanimation.json"
+ source: "qrc:///cubeanimation.json"
onDurationChanged: console.log("duration = " + duration)
}