aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/animations
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/animations')
-rw-r--r--src/qml/animations/qanimationgroupjob_p.h2
-rw-r--r--src/qml/animations/qsequentialanimationgroupjob.cpp9
-rw-r--r--src/qml/animations/qsequentialanimationgroupjob_p.h1
3 files changed, 11 insertions, 1 deletions
diff --git a/src/qml/animations/qanimationgroupjob_p.h b/src/qml/animations/qanimationgroupjob_p.h
index b01b2f3b36..a27c9195dd 100644
--- a/src/qml/animations/qanimationgroupjob_p.h
+++ b/src/qml/animations/qanimationgroupjob_p.h
@@ -72,7 +72,7 @@ public:
QAbstractAnimationJob *firstChild() const { return m_firstChild; }
QAbstractAnimationJob *lastChild() const { return m_lastChild; }
- void clear();
+ virtual void clear();
//called by QAbstractAnimationJob
virtual void uncontrolledAnimationFinished(QAbstractAnimationJob *animation);
diff --git a/src/qml/animations/qsequentialanimationgroupjob.cpp b/src/qml/animations/qsequentialanimationgroupjob.cpp
index 22e20d9268..d98546122f 100644
--- a/src/qml/animations/qsequentialanimationgroupjob.cpp
+++ b/src/qml/animations/qsequentialanimationgroupjob.cpp
@@ -204,6 +204,15 @@ int QSequentialAnimationGroupJob::duration() const
return ret;
}
+void QSequentialAnimationGroupJob::clear()
+{
+ m_previousLoop = 0;
+ QAnimationGroupJob::clear();
+
+ // clear() should call removeAnimation(), which will clear m_currentAnimation, eventually.
+ Q_ASSERT(m_currentAnimation == nullptr);
+}
+
void QSequentialAnimationGroupJob::updateCurrentTime(int currentTime)
{
if (!m_currentAnimation)
diff --git a/src/qml/animations/qsequentialanimationgroupjob_p.h b/src/qml/animations/qsequentialanimationgroupjob_p.h
index 13f9806be1..34e8fe1e08 100644
--- a/src/qml/animations/qsequentialanimationgroupjob_p.h
+++ b/src/qml/animations/qsequentialanimationgroupjob_p.h
@@ -68,6 +68,7 @@ public:
int duration() const override;
QAbstractAnimationJob *currentAnimation() const { return m_currentAnimation; }
+ void clear() override;
protected:
void updateCurrentTime(int) override;