Fix QDefaultAnimationDriver
authorAlan Alpert <alan.alpert@nokia.com>
Tue, 10 May 2011 03:43:58 +0000 (13:43 +1000)
committerAlan Alpert <alan.alpert@nokia.com>
Tue, 10 May 2011 03:43:58 +0000 (13:43 +1000)
Animation drivers were changed to used signals instead of virtual
functions, but the default animation driver was left behind.

Reviewed-by: Michael Brasser
src/corelib/animation/qabstractanimation.cpp
src/corelib/animation/qabstractanimation_p.h

index 7d74de8..d43ca51 100644 (file)
@@ -580,6 +580,8 @@ qint64 QAnimationDriver::elapsed() const
 QDefaultAnimationDriver::QDefaultAnimationDriver(QUnifiedTimer *timer)
     : QAnimationDriver(0), m_unified_timer(timer)
 {
+    connect(this, SIGNAL(started()), this, SLOT(startTimer()));
+    connect(this, SIGNAL(stopped()), this, SLOT(stopTimer()));
 }
 
 void QDefaultAnimationDriver::timerEvent(QTimerEvent *e)
@@ -589,12 +591,12 @@ void QDefaultAnimationDriver::timerEvent(QTimerEvent *e)
     advance();
 }
 
-void QDefaultAnimationDriver::started()
+void QDefaultAnimationDriver::startTimer()
 {
     m_timer.start(m_unified_timer->timingInterval, this);
 }
 
-void QDefaultAnimationDriver::stopped()
+void QDefaultAnimationDriver::stopTimer()
 {
     m_timer.stop();
 }
index de26987..3389414 100644 (file)
@@ -124,8 +124,9 @@ public:
     QDefaultAnimationDriver(QUnifiedTimer *timer);
     void timerEvent(QTimerEvent *e);
 
-    void started();
-    void stopped();
+private Q_SLOTS:
+    void startTimer();
+    void stopTimer();
 
 private:
     QBasicTimer m_timer;