diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-03-31 00:18:23 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-04-08 05:06:10 (GMT) |
commit | bcb8c932aa10cd207850a8bfcdd12d90d440f18a (patch) | |
tree | a530c81826aff30c741ac91ab837669152624fc6 /src | |
parent | 0b354c8a2f2a0b76434546ff3e4f6a0d94a05b4b (diff) | |
download | Qt-bcb8c932aa10cd207850a8bfcdd12d90d440f18a.zip Qt-bcb8c932aa10cd207850a8bfcdd12d90d440f18a.tar.gz Qt-bcb8c932aa10cd207850a8bfcdd12d90d440f18a.tar.bz2 |
Refactor in smoothedanimation, removed unneeded code
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/util/qdeclarativesmoothedanimation.cpp | 6 | ||||
-rw-r--r-- | src/declarative/util/qdeclarativesmoothedanimation_p.h | 1 |
2 files changed, 1 insertions, 6 deletions
diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp index a30e577..21a8be2 100644 --- a/src/declarative/util/qdeclarativesmoothedanimation.cpp +++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp @@ -343,17 +343,14 @@ void QDeclarativeSmoothedAnimation::transition(QDeclarativeStateActions &actions QSet<QAbstractAnimation*> anims; for (int i = 0; i < d->actions->size(); i++) { QSmoothedAnimation *ease; - qreal trackVelocity; bool needsRestart; if (!d->activeAnimations.contains((*d->actions)[i].property)) { ease = new QSmoothedAnimation(); d->wrapperGroup->addAnimation(ease); d->activeAnimations.insert((*d->actions)[i].property, ease); - trackVelocity = 0.0; needsRestart = false; } else { ease = d->activeAnimations.value((*d->actions)[i].property); - trackVelocity = ease->trackVelocity; needsRestart = true; } @@ -366,8 +363,7 @@ void QDeclarativeSmoothedAnimation::transition(QDeclarativeStateActions &actions ease->velocity = d->anim->velocity; ease->userDuration = d->anim->userDuration; - ease->trackVelocity = trackVelocity; - ease->initialVelocity = trackVelocity; + ease->initialVelocity = ease->trackVelocity; if (needsRestart) ease->init(); diff --git a/src/declarative/util/qdeclarativesmoothedanimation_p.h b/src/declarative/util/qdeclarativesmoothedanimation_p.h index df53104..17aafa4 100644 --- a/src/declarative/util/qdeclarativesmoothedanimation_p.h +++ b/src/declarative/util/qdeclarativesmoothedanimation_p.h @@ -83,7 +83,6 @@ public: int maximumEasingTime() const; void setMaximumEasingTime(int); -public: virtual void transition(QDeclarativeStateActions &actions, QDeclarativeProperties &modified, TransitionDirection direction); |