summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-03-31 00:18:23 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-04-08 05:06:10 (GMT)
commitbcb8c932aa10cd207850a8bfcdd12d90d440f18a (patch)
treea530c81826aff30c741ac91ab837669152624fc6
parent0b354c8a2f2a0b76434546ff3e4f6a0d94a05b4b (diff)
downloadQt-bcb8c932aa10cd207850a8bfcdd12d90d440f18a.zip
Qt-bcb8c932aa10cd207850a8bfcdd12d90d440f18a.tar.gz
Qt-bcb8c932aa10cd207850a8bfcdd12d90d440f18a.tar.bz2
Refactor in smoothedanimation, removed unneeded code
-rw-r--r--src/declarative/util/qdeclarativesmoothedanimation.cpp6
-rw-r--r--src/declarative/util/qdeclarativesmoothedanimation_p.h1
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);