Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging: Fix QDefaultAnimationDriver
This commit is contained in:
commit
7f9c32bd39
@ -580,6 +580,8 @@ qint64 QAnimationDriver::elapsed() const
|
|||||||
QDefaultAnimationDriver::QDefaultAnimationDriver(QUnifiedTimer *timer)
|
QDefaultAnimationDriver::QDefaultAnimationDriver(QUnifiedTimer *timer)
|
||||||
: QAnimationDriver(0), m_unified_timer(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)
|
void QDefaultAnimationDriver::timerEvent(QTimerEvent *e)
|
||||||
@ -589,12 +591,12 @@ void QDefaultAnimationDriver::timerEvent(QTimerEvent *e)
|
|||||||
advance();
|
advance();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QDefaultAnimationDriver::started()
|
void QDefaultAnimationDriver::startTimer()
|
||||||
{
|
{
|
||||||
m_timer.start(m_unified_timer->timingInterval, this);
|
m_timer.start(m_unified_timer->timingInterval, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QDefaultAnimationDriver::stopped()
|
void QDefaultAnimationDriver::stopTimer()
|
||||||
{
|
{
|
||||||
m_timer.stop();
|
m_timer.stop();
|
||||||
}
|
}
|
||||||
|
@ -124,8 +124,9 @@ public:
|
|||||||
QDefaultAnimationDriver(QUnifiedTimer *timer);
|
QDefaultAnimationDriver(QUnifiedTimer *timer);
|
||||||
void timerEvent(QTimerEvent *e);
|
void timerEvent(QTimerEvent *e);
|
||||||
|
|
||||||
void started();
|
private Q_SLOTS:
|
||||||
void stopped();
|
void startTimer();
|
||||||
|
void stopTimer();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QBasicTimer m_timer;
|
QBasicTimer m_timer;
|
||||||
|
Loading…
Reference in New Issue
Block a user