aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-03-07 08:58:10 +0100
committerLiang Qi <liang.qi@qt.io>2017-03-07 08:09:35 +0000
commit7fe0d1a06830518e8ce6752e45a0a01b1b97fa73 (patch)
tree59042999eb9356926860718ee1141ce357d287db /src/quick/util
parenta54f08e1ead70e821f438279e548d54e38c4aa8f (diff)
Revert "QQuickAnimatorProxyJob: make sure to stop when detached from a window"
This reverts commit 05a88efb266ec3b7b16d6db0d971c21ae7f45c9d. It caused some test failures in qtquickcontrols and qtquickcontrols2. Task-number: QTBUG-59326 Task-number: QTBUG-59327 Change-Id: I9a26a4518bf7c106372916761aae69ba65f6df9e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quick/util')
-rw-r--r--src/quick/util/qquickanimatorjob.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/quick/util/qquickanimatorjob.cpp b/src/quick/util/qquickanimatorjob.cpp
index dced8b49a9..4aacb09c97 100644
--- a/src/quick/util/qquickanimatorjob.cpp
+++ b/src/quick/util/qquickanimatorjob.cpp
@@ -140,11 +140,6 @@ QObject *QQuickAnimatorProxyJob::findAnimationContext(QQuickAbstractAnimation *a
void QQuickAnimatorProxyJob::updateCurrentTime(int)
{
- // 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.
- Q_ASSERT(m_controller);
-
// We do a simple check here to see if the animator has run and stopped on
// the render thread. isPendingStart() will perform a check against jobs
// that have been scheduled for start, but that will not yet have entered
@@ -172,9 +167,9 @@ void QQuickAnimatorProxyJob::updateState(QAbstractAnimationJob::State newState,
}
} else if (newState == Stopped) {
+ syncBackCurrentValues();
m_internalState = State_Stopped;
if (m_controller) {
- syncBackCurrentValues();
m_controller->cancel(m_job);
}
}
@@ -198,7 +193,6 @@ void QQuickAnimatorProxyJob::setWindow(QQuickWindow *window)
if (m_job && m_controller)
m_controller->cancel(m_job);
m_controller = nullptr;
- stop();
} else if (!m_controller && m_job) {
m_controller = QQuickWindowPrivate::get(window)->animationController;