diff options
Diffstat (limited to 'src/declarative/util/qmltimer.cpp')
-rw-r--r-- | src/declarative/util/qmltimer.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/declarative/util/qmltimer.cpp b/src/declarative/util/qmltimer.cpp index 456b2ef..2d3a343 100644 --- a/src/declarative/util/qmltimer.cpp +++ b/src/declarative/util/qmltimer.cpp @@ -55,12 +55,13 @@ class QmlTimerPrivate : public QObjectPrivate public: QmlTimerPrivate() : interval(1000), running(false), repeating(false), triggeredOnStart(false) - , componentComplete(false) {} + , classBegun(false), componentComplete(false) {} int interval; bool running; bool repeating; bool triggeredOnStart; QPauseAnimation pause; + bool classBegun; bool componentComplete; }; @@ -190,7 +191,7 @@ void QmlTimer::setTriggeredOnStart(bool triggeredOnStart) void QmlTimer::update() { Q_D(QmlTimer); - if (!d->componentComplete) + if (d->classBegun && !d->componentComplete) return; d->pause.stop(); if (d->running) { @@ -204,6 +205,12 @@ void QmlTimer::update() } } +void QmlTimer::classBegin() +{ + Q_D(QmlTimer); + d->classBegun = true; +} + void QmlTimer::componentComplete() { Q_D(QmlTimer); |