QStyleAnimation: use QAbstractAnimation::DeleteWhenStopped
This ensures that unexpectedly stopped (for example, when minimizing a window) style animations are removed from QCommonStyle. Task-number: QTBUG-28978 Change-Id: I1403502d85e0614d8644892a2231938c29a8c9c2 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
parent
cded50e6f2
commit
4d2eb3dd01
@ -1149,7 +1149,7 @@ void QCommonStylePrivate::startAnimation(QStyleAnimation *animation) const
|
||||
stopAnimation(animation->target());
|
||||
q->connect(animation, SIGNAL(destroyed()), SLOT(_q_removeAnimation()), Qt::UniqueConnection);
|
||||
animations.insert(animation->target(), animation);
|
||||
animation->start();
|
||||
animation->start(QAbstractAnimation::DeleteWhenStopped);
|
||||
}
|
||||
|
||||
/*! \internal */
|
||||
|
@ -53,7 +53,6 @@ QStyleAnimation::QStyleAnimation(QObject *target) : QAbstractAnimation(),
|
||||
moveToThread(target->thread());
|
||||
setParent(target);
|
||||
}
|
||||
connect(this, SIGNAL(finished()), SLOT(deleteLater()));
|
||||
}
|
||||
|
||||
QStyleAnimation::~QStyleAnimation()
|
||||
|
Loading…
Reference in New Issue
Block a user