aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquicksmoothedanimation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/util/qquicksmoothedanimation.cpp')
-rw-r--r--src/quick/util/qquicksmoothedanimation.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/quick/util/qquicksmoothedanimation.cpp b/src/quick/util/qquicksmoothedanimation.cpp
index 4681d5919e..b19e6f03d9 100644
--- a/src/quick/util/qquicksmoothedanimation.cpp
+++ b/src/quick/util/qquicksmoothedanimation.cpp
@@ -52,14 +52,12 @@ QSmoothedAnimation::~QSmoothedAnimation()
delete delayedStopTimer;
if (animationTemplate) {
if (target.object()) {
- QHash<QQmlProperty, QSmoothedAnimation* >::iterator it =
- animationTemplate->activeAnimations.find(target);
- if (it != animationTemplate->activeAnimations.end() && it.value() == this)
+ auto it = animationTemplate->activeAnimations.constFind(target);
+ if (it != animationTemplate->activeAnimations.cend() && it.value() == this)
animationTemplate->activeAnimations.erase(it);
} else {
//target is no longer valid, need to search linearly
- QHash<QQmlProperty, QSmoothedAnimation* >::iterator it;
- for (it = animationTemplate->activeAnimations.begin(); it != animationTemplate->activeAnimations.end(); ++it) {
+ for (auto it = animationTemplate->activeAnimations.cbegin(); it != animationTemplate->activeAnimations.cend(); ++it) {
if (it.value() == this) {
animationTemplate->activeAnimations.erase(it);
break;
@@ -421,11 +419,12 @@ QAbstractAnimationJob* QQuickSmoothedAnimation::transition(QQuickStateActions &a
Possible values are:
- \list
- \li SmoothedAnimation.Eased (default) - the animation will smoothly decelerate, and then reverse direction
- \li SmoothedAnimation.Immediate - the animation will immediately begin accelerating in the reverse direction, beginning with a velocity of 0
- \li SmoothedAnimation.Sync - the property is immediately set to the target value
- \endlist
+ \value SmoothedAnimation.Eased
+ (default) the animation will smoothly decelerate, and then reverse direction
+ \value SmoothedAnimation.Immediate
+ the animation will immediately begin accelerating in the reverse direction, beginning with a velocity of 0
+ \value SmoothedAnimation.Sync
+ the property is immediately set to the target value
*/
QQuickSmoothedAnimation::ReversingMode QQuickSmoothedAnimation::reversingMode() const
{