summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation/qabstractanimation_p.h
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2011-12-09 12:39:53 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-13 02:23:42 +0100
commit3bd3b82a2f6e61bb9f5bcc095ef96b39d8e19b80 (patch)
tree50b547e7caae17f13068d457c4bc06a422a72389 /src/corelib/animation/qabstractanimation_p.h
parent309cdc358ec646090a1e5809c3817df8af1f531f (diff)
Fix possible jump in animation timer.
If both a stop and start happen within an event loop, ensure they are processed in order. Based on a patch from Charles Yin. Task-number: QTBUG-22865 Change-Id: I6131bd43a6ba5ad4fa37c863a9f4598bf2ac0e01 Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/corelib/animation/qabstractanimation_p.h')
-rw-r--r--src/corelib/animation/qabstractanimation_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index 7e7571bc58..61a68a7032 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -144,6 +144,7 @@ typedef QElapsedTimer ElapsedTimer;
class Q_CORE_EXPORT QUnifiedTimer : public QObject
{
+ Q_OBJECT
private:
QUnifiedTimer();
@@ -194,6 +195,10 @@ public:
protected:
void timerEvent(QTimerEvent *);
+private Q_SLOTS:
+ void startAnimations();
+ void stopTimer();
+
private:
friend class QDefaultAnimationDriver;
friend class QAnimationDriver;
@@ -213,6 +218,8 @@ private:
bool insideTick;
bool consistentTiming;
bool slowMode;
+ bool startAnimationPending;
+ bool stopTimerPending;
// This factor will be used to divide the DEFAULT_TIMER_INTERVAL at each tick
// when slowMode is enabled. Setting it to 0 or higher than DEFAULT_TIMER_INTERVAL (16)