aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2018-07-11 13:25:42 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2018-07-13 09:30:56 +0000
commitcf0b965aaab0ea7e777c1f8e8d35de3a73d7d08e (patch)
treed8b9d19e10b77d186abf95c410749068765a6407 /src
parentf4cbe6498bb070e658547dbed1beb0d8383981cf (diff)
[Quick] Make sure an transition instance is stopped when destroyed
When a running transition does not finish of natural causes (reached the end state due to e.g. the timer finishing), it can happen that it will never be marked as finished. Specifically, when an transition is running (e.g. an add animation for a ListView), and that transition is replaced by another transition (a displace transition, because another item got added to the ListView before the add transition was finished), the first animation was never marked as stopped. The effect was that the running property would stay "true" for forever. Task-number: QTBUG-38099 Change-Id: Id7d7053cb2fc1912127d9f5e71f27eb984ba7435 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quick/util/qquicktransition.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/util/qquicktransition.cpp b/src/quick/util/qquicktransition.cpp
index c8699426f2..ad451c8f8b 100644
--- a/src/quick/util/qquicktransition.cpp
+++ b/src/quick/util/qquicktransition.cpp
@@ -211,6 +211,7 @@ QQuickTransitionInstance::QQuickTransitionInstance(QQuickTransition *transition,
QQuickTransitionInstance::~QQuickTransitionInstance()
{
+ stop();
removeStateChangeListener();
delete m_anim;
}