diff options
Diffstat (limited to 'src/quick/util')
-rw-r--r-- | src/quick/util/qquickanimatorjob.cpp | 9 | ||||
-rw-r--r-- | src/quick/util/qquickanimatorjob_p.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/quick/util/qquickanimatorjob.cpp b/src/quick/util/qquickanimatorjob.cpp index 767be96403..2ae8a5a2aa 100644 --- a/src/quick/util/qquickanimatorjob.cpp +++ b/src/quick/util/qquickanimatorjob.cpp @@ -123,6 +123,11 @@ QQuickAnimatorProxyJob::QQuickAnimatorProxyJob(QAbstractAnimationJob *job, QObje } } +void QQuickAnimatorProxyJob::updateLoopCount(int loopCount) +{ + m_job->setLoopCount(loopCount); +} + QQuickAnimatorProxyJob::~QQuickAnimatorProxyJob() { if (m_job && m_controller) @@ -143,6 +148,10 @@ void QQuickAnimatorProxyJob::updateCurrentTime(int) if (m_internalState != State_Running) return; + // Copy current loop number from the job + // we could make currentLoop() virtual but it would be less efficient + m_currentLoop = m_job->currentLoop(); + // A proxy which is being ticked should be associated with a window, (see // setWindow() below). If we get here when there is no more controller we // have a problem. diff --git a/src/quick/util/qquickanimatorjob_p.h b/src/quick/util/qquickanimatorjob_p.h index 74085526c0..522540bcbc 100644 --- a/src/quick/util/qquickanimatorjob_p.h +++ b/src/quick/util/qquickanimatorjob_p.h @@ -87,6 +87,7 @@ public: protected: void updateCurrentTime(int) override; + void updateLoopCount(int) override; void updateState(QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState) override; void debugAnimation(QDebug d) const override; |