diff options
Diffstat (limited to 'src/corelib/animation/qsequentialanimationgroup.cpp')
-rw-r--r-- | src/corelib/animation/qsequentialanimationgroup.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp index 25d6d1de37..260481dbef 100644 --- a/src/corelib/animation/qsequentialanimationgroup.cpp +++ b/src/corelib/animation/qsequentialanimationgroup.cpp @@ -172,7 +172,7 @@ void QSequentialAnimationGroupPrivate::rewindForwards(const AnimationIndex &newA // we need to force activation because setCurrentAnimation will have no effect activateCurrentAnimation(); else - setCurrentAnimation(animations.count() - 1, true); + setCurrentAnimation(animations.size() - 1, true); } // and now we need to fast rewind from the current position to @@ -396,7 +396,7 @@ void QSequentialAnimationGroupPrivate::setCurrentAnimation(int index, bool inter // currentAnimation.removeBindingUnlessInWrapper() // is not necessary here, since it is read only - index = qMin(index, animations.count() - 1); + index = qMin(index, animations.size() - 1); if (index == -1) { Q_ASSERT(animations.isEmpty()); @@ -472,7 +472,7 @@ void QSequentialAnimationGroupPrivate::_q_uncontrolledAnimationFinished() the group at index \a index. Note: We only support insertion after the current animation */ -void QSequentialAnimationGroupPrivate::animationInsertedAt(int index) +void QSequentialAnimationGroupPrivate::animationInsertedAt(qsizetype index) { if (currentAnimation == nullptr) { setCurrentAnimation(0); // initialize the current animation @@ -500,7 +500,7 @@ void QSequentialAnimationGroupPrivate::animationInsertedAt(int index) the group at index \a index. The animation is no more listed when this method is called. */ -void QSequentialAnimationGroupPrivate::animationRemoved(int index, QAbstractAnimation *anim) +void QSequentialAnimationGroupPrivate::animationRemoved(qsizetype index, QAbstractAnimation *anim) { Q_Q(QSequentialAnimationGroup); QAnimationGroupPrivate::animationRemoved(index, anim); @@ -511,13 +511,13 @@ void QSequentialAnimationGroupPrivate::animationRemoved(int index, QAbstractAnim if (actualDuration.size() > index) actualDuration.removeAt(index); - const int currentIndex = animations.indexOf(currentAnimation); + const qsizetype currentIndex = animations.indexOf(currentAnimation); if (currentIndex == -1) { //we're removing the current animation disconnectUncontrolledAnimation(currentAnimation); - if (index < animations.count()) + if (index < animations.size()) setCurrentAnimation(index); //let's try to take the next one else if (index > 0) setCurrentAnimation(index - 1); @@ -529,7 +529,7 @@ void QSequentialAnimationGroupPrivate::animationRemoved(int index, QAbstractAnim // duration of the previous animations up to the current animation currentTime = 0; - for (int i = 0; i < currentAnimationIndex; ++i) { + for (qsizetype i = 0; i < currentAnimationIndex; ++i) { const int current = animationActualTotalDuration(i); currentTime += current; } |