Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.3
-
None
-
PC Linux 32 Bits Ubuntu
Description
It is not possible to re-start a singleshot timer in the onTriggered handler since the timer is stopped only after the onTriggered handler.
A possible fix is to change this code from
void QDeclarativeTimer::finished() { Q_D(QDeclarativeTimer); if (d->repeating || !d->running) return; emit triggered(); d->running = false; d->firstTick = false; emit runningChanged(); }
to
void QDeclarativeTimer::finished() { Q_D(QDeclarativeTimer); if (d->repeating || !d->running) return; d->running = false; d->firstTick = false; emit runningChanged(); emit triggered(); }
Attachments
For Gerrit Dashboard: QTBUG-22004 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
12600,1 | Fix restarting timer from onTriggered handler. | master | qt/qtdeclarative | Status: MERGED | +2 | 0 |