Avoid using previously declared variables
authorCharles Yin <charles.yin@nokia.com>
Tue, 29 May 2012 00:51:21 +0000 (10:51 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 29 May 2012 03:57:48 +0000 (05:57 +0200)
Change-Id: Ia4ba88bef012cee7329244adf10c219bd763a936
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
src/qml/animations/qsequentialanimationgroupjob.cpp

index 12cce39..83860eb 100644 (file)
@@ -368,10 +368,10 @@ void QSequentialAnimationGroupJob::animationRemoved(QAbstractAnimationJob *anim,
 
     // duration of the previous animations up to the current animation
     m_currentTime = 0;
-    for (QAbstractAnimationJob *anim = firstChild(); anim; anim = anim->nextSibling()) {
-        if (anim == m_currentAnimation)
+    for (QAbstractAnimationJob *job = firstChild(); job; job = job->nextSibling()) {
+        if (job == m_currentAnimation)
             break;
-        m_currentTime += animationActualTotalDuration(anim);
+        m_currentTime += animationActualTotalDuration(job);
 
     }