summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-09-23 13:30:24 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-09-23 13:48:51 (GMT)
commit9d552fbf54a25b4bab7fff8a150ab0d03d524983 (patch)
tree350b11394c542050c2de08e8663d8cf0c19717a7 /tests/benchmarks
parentb9fd3e2836553dbe9c48c5d8784155b02a5699a2 (diff)
downloadQt-9d552fbf54a25b4bab7fff8a150ab0d03d524983.zip
Qt-9d552fbf54a25b4bab7fff8a150ab0d03d524983.tar.gz
Qt-9d552fbf54a25b4bab7fff8a150ab0d03d524983.tar.bz2
Small change in the API of animations
We're not taking a parameter in updateCurrentTime any more because that parameter was the total currenttime. So it was taking into account the currenttime and the currentloop at once. This was inconsistent Reviewed-by: Leo
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/qanimation/rectanimation.cpp4
-rw-r--r--tests/benchmarks/qanimation/rectanimation.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/benchmarks/qanimation/rectanimation.cpp b/tests/benchmarks/qanimation/rectanimation.cpp
index e5f2f57..5522847 100644
--- a/tests/benchmarks/qanimation/rectanimation.cpp
+++ b/tests/benchmarks/qanimation/rectanimation.cpp
@@ -73,9 +73,9 @@ int RectAnimation::duration() const
}
-void RectAnimation::updateCurrentTime(int msecs)
+void RectAnimation::updateCurrentTime()
{
- qreal progress = m_easing.valueForProgress( qreal(msecs) / qreal(m_dura) );
+ qreal progress = m_easing.valueForProgress( currentTime() / qreal(m_dura) );
QRect now;
now.setCoords(interpolateInteger(m_start.left(), m_end.left(), progress),
interpolateInteger(m_start.top(), m_end.top(), progress),
diff --git a/tests/benchmarks/qanimation/rectanimation.h b/tests/benchmarks/qanimation/rectanimation.h
index 84ec97d..995becb 100644
--- a/tests/benchmarks/qanimation/rectanimation.h
+++ b/tests/benchmarks/qanimation/rectanimation.h
@@ -58,7 +58,7 @@ public:
void setDuration(int d);
int duration() const;
- virtual void updateCurrentTime(int msecs);
+ virtual void updateCurrentTime();
virtual void updateState(QAbstractAnimation::State state);
private: