Style animations: fix QCommonStylePrivate::stopAnimation()
Explicitly delete animations, and remove the check for stopped state as that is already done by QAbstractAnimation::stop() and we want to delete the animation regardless of the current state. Task-number: QTBUG-28506 Change-Id: I3e34316e5077a8627ff5e6d3babd1873bbbaa774 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
parent
a3a4114f53
commit
12775b817f
@ -1156,8 +1156,10 @@ void QCommonStylePrivate::startAnimation(QStyleAnimation *animation) const
|
||||
void QCommonStylePrivate::stopAnimation(const QObject *target) const
|
||||
{
|
||||
QStyleAnimation *animation = animations.take(target);
|
||||
if (animation && animation->state() != QAbstractAnimation::Stopped)
|
||||
if (animation) {
|
||||
animation->stop();
|
||||
delete animation;
|
||||
}
|
||||
}
|
||||
|
||||
/*! \internal */
|
||||
|
Loading…
Reference in New Issue
Block a user