diff options
3 files changed, 83 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 1fb3d99..bead842 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -1318,8 +1318,8 @@ void QDeclarativeAnimationGroupPrivate::append_animation(QDeclarativeListPropert { QDeclarativeAnimationGroup *q = qobject_cast<QDeclarativeAnimationGroup *>(list->object); if (q) { - q->d_func()->animations.append(a); a->setGroup(q); + QDeclarative_setParent_noEvent(a->qtAnimation(), q->d_func()->ag); q->d_func()->ag->addAnimation(a->qtAnimation()); } } diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/animation/large.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/animation/large.qml new file mode 100644 index 0000000..978e3bf --- /dev/null +++ b/tests/benchmarks/declarative/qdeclarativetime/tests/animation/large.qml @@ -0,0 +1,41 @@ +import Qt 4.6 +import QDeclarativeTime 1.0 as QDeclarativeTime + +Item { + + QDeclarativeTime.Timer { + component: Component { + ParallelAnimation { + NumberAnimation { duration: 500 } + NumberAnimation { duration: 4000; } + NumberAnimation { duration: 2000; easing.type: "OutBack"} + ColorAnimation { duration: 3000} + SequentialAnimation { + PauseAnimation { duration: 1000 } + ScriptAction { script: doSomething(); } + PauseAnimation { duration: 800 } + ScriptAction { script: doSomethingElse(); } + PauseAnimation { duration: 800 } + ParallelAnimation { + NumberAnimation { duration: 200;} + SequentialAnimation { + PauseAnimation { duration: 200} + ParallelAnimation { + NumberAnimation { duration: 300;} + NumberAnimation { duration: 300;} + } + NumberAnimation { from: 0; to: 1; duration: 500 } + PauseAnimation { duration: 200 } + NumberAnimation { from: 1; to: 0; duration: 500 } + } + SequentialAnimation { + PauseAnimation { duration: 150} + NumberAnimation { duration: 300; easing.type: "OutBounce" } + } + } + } + } + } + } + +} diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/animation/largeNoProps.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/animation/largeNoProps.qml new file mode 100644 index 0000000..cceb3f4 --- /dev/null +++ b/tests/benchmarks/declarative/qdeclarativetime/tests/animation/largeNoProps.qml @@ -0,0 +1,41 @@ +import Qt 4.6 +import QDeclarativeTime 1.0 as QDeclarativeTime + +Item { + + QDeclarativeTime.Timer { + component: Component { + ParallelAnimation { + NumberAnimation { } + NumberAnimation { } + NumberAnimation { } + ColorAnimation { } + SequentialAnimation { + PauseAnimation { } + ScriptAction { } + PauseAnimation { } + ScriptAction { } + PauseAnimation { } + ParallelAnimation { + NumberAnimation { } + SequentialAnimation { + PauseAnimation { } + ParallelAnimation { + NumberAnimation { } + NumberAnimation { } + } + NumberAnimation { } + PauseAnimation { } + NumberAnimation { } + } + SequentialAnimation { + PauseAnimation { } + NumberAnimation { } + } + } + } + } + } + } + +} |