summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2013-03-12 10:24:37 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-20 08:16:57 (GMT)
commit1d2234498cde6821014fcec7f2b321ad76724cce (patch)
treedbd0ae6561786146d26e5cec45a89493bd38fc24 /src/corelib
parent32a66514c6a907604c1efced5ba0c885ea7c7355 (diff)
downloadQt-1d2234498cde6821014fcec7f2b321ad76724cce.zip
Qt-1d2234498cde6821014fcec7f2b321ad76724cce.tar.gz
Qt-1d2234498cde6821014fcec7f2b321ad76724cce.tar.bz2
Fixed bug in QTimeLine::setPaused(false)
The problem was that the elapsed timer was not restarted, causing the currentTime() not being adjusted for the time it was paused. (cherry-picked from Qt 5: 75614792fa2370b6b0402117bf) Task-number: QTBUG-30108 Change-Id: I9718aa408075623514717328321c34e7ab3af436 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qtimeline.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qtimeline.cpp b/src/corelib/tools/qtimeline.cpp
index 1cfbe43..7d4dd90 100644
--- a/src/corelib/tools/qtimeline.cpp
+++ b/src/corelib/tools/qtimeline.cpp
@@ -748,7 +748,10 @@ void QTimeLine::setPaused(bool paused)
d->timerId = 0;
d->setState(Paused);
} else if (!paused && d->state == Paused) {
+ // Same as resume()
d->timerId = startTimer(d->updateInterval);
+ d->startTime = d->currentTime;
+ d->timer.start();
d->setState(Running);
}
}