diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2013-01-10 11:28:49 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-12 09:46:29 +0100 |
commit | 4d2eb3dd01620f4e26f97dca747206ddbc0840c7 (patch) | |
tree | be64f49557acc7bb01f411d23cd0a06a0c198907 /src/widgets | |
parent | cded50e6f23594a0acc65c6e949d0bf99bd7bf6f (diff) |
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>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/styles/qcommonstyle.cpp | 2 | ||||
-rw-r--r-- | src/widgets/styles/qstyleanimation.cpp | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 7519d7f910..75407c11c5 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -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 */ diff --git a/src/widgets/styles/qstyleanimation.cpp b/src/widgets/styles/qstyleanimation.cpp index 9ddcbcc511..bed3192219 100644 --- a/src/widgets/styles/qstyleanimation.cpp +++ b/src/widgets/styles/qstyleanimation.cpp @@ -53,7 +53,6 @@ QStyleAnimation::QStyleAnimation(QObject *target) : QAbstractAnimation(), moveToThread(target->thread()); setParent(target); } - connect(this, SIGNAL(finished()), SLOT(deleteLater())); } QStyleAnimation::~QStyleAnimation() |