diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-11-09 23:29:14 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-11-09 23:29:14 (GMT) |
commit | fc5fd47fc7e7d87d17386e23690af4fec80dae05 (patch) | |
tree | 3ca121b3779345ef89a0c2825cd0b1f2371f07f1 | |
parent | 9b3a87a0f20023b59b3d59807aac69e53be277eb (diff) | |
download | Qt-fc5fd47fc7e7d87d17386e23690af4fec80dae05.zip Qt-fc5fd47fc7e7d87d17386e23690af4fec80dae05.tar.gz Qt-fc5fd47fc7e7d87d17386e23690af4fec80dae05.tar.bz2 |
Fix after animation API changes.
-rw-r--r-- | src/declarative/util/qmlanimation.cpp | 2 | ||||
-rw-r--r-- | src/declarative/util/qmlanimation_p_p.h | 6 | ||||
-rw-r--r-- | src/declarative/util/qmltransition.cpp | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 94cdadf..435ddae 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -388,7 +388,7 @@ void QmlAbstractAnimation::setRepeat(bool r) int QmlAbstractAnimation::currentTime() { - return qtAnimation()->currentTime(); + return qtAnimation()->currentLoopTime(); } void QmlAbstractAnimation::setCurrentTime(int time) diff --git a/src/declarative/util/qmlanimation_p_p.h b/src/declarative/util/qmlanimation_p_p.h index 1372343..21c0284 100644 --- a/src/declarative/util/qmlanimation_p_p.h +++ b/src/declarative/util/qmlanimation_p_p.h @@ -108,7 +108,7 @@ public: protected: virtual void updateCurrentTime(int) {} - virtual void updateState(State /*oldState*/, State newState) + virtual void updateState(State newState, State /*oldState*/) { if (newState == Running) { if (animAction) @@ -147,9 +147,9 @@ protected: if (animValue) animValue->setValue(value.toDouble()); } - virtual void updateState(State oldState, State newState) + virtual void updateState(State newState, State oldState) { - QVariantAnimation::updateState(oldState, newState); + QVariantAnimation::updateState(newState, oldState); if (newState == Running) { //check for new from every loop if (fromSourced) diff --git a/src/declarative/util/qmltransition.cpp b/src/declarative/util/qmltransition.cpp index d61359d..7eb9e53 100644 --- a/src/declarative/util/qmltransition.cpp +++ b/src/declarative/util/qmltransition.cpp @@ -74,7 +74,7 @@ public: ParallelAnimationWrapper(QObject *parent) : QParallelAnimationGroup(parent) {} QmlTransitionPrivate *trans; protected: - virtual void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState); + virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); }; class QmlTransitionPrivate : public QObjectPrivate @@ -124,13 +124,13 @@ void QmlTransitionPrivate::AnimationList::append(QmlAbstractAnimation *a) parent->group->addAnimation(a->qtAnimation()); } -void ParallelAnimationWrapper::updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState) +void ParallelAnimationWrapper::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) { - QParallelAnimationGroup::updateState(oldState, newState); + QParallelAnimationGroup::updateState(newState, oldState); //XXX not 100% guaranteed to be at end (if there are many zero duration animations at the end)? if (newState == Stopped && - ((direction() == QAbstractAnimation::Forward && currentTime() == duration()) || - (direction() == QAbstractAnimation::Backward && currentTime() == 0))) + ((direction() == QAbstractAnimation::Forward && currentLoopTime() == duration()) || + (direction() == QAbstractAnimation::Backward && currentLoopTime() == 0))) { trans->complete(); } |