summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2011-05-10 13:43:58 +1000
committerAlan Alpert <alan.alpert@nokia.com>2011-05-10 13:43:58 +1000
commit8fb592846930f09ff465442fd10e522226963968 (patch)
treef736387c6a2e54793a976e04e59fdfaa7baccaca
parent7eef0de0912a2084dda47f2a862af8e6064b9a64 (diff)
Fix QDefaultAnimationDriver
Animation drivers were changed to used signals instead of virtual functions, but the default animation driver was left behind. Reviewed-by: Michael Brasser
-rw-r--r--src/corelib/animation/qabstractanimation.cpp6
-rw-r--r--src/corelib/animation/qabstractanimation_p.h5
2 files changed, 7 insertions, 4 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 7d74de8e44..d43ca51bc1 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -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();
}
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index de26987721..3389414995 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -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;