Add Qt::TimerType and the QTimer::timerType property
authorBradley T. Hughes <bradley.hughes@nokia.com>
Wed, 21 Dec 2011 10:32:43 +0000 (11:32 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 2 Jan 2012 09:44:00 +0000 (10:44 +0100)
commitef60ed1c9dbc87d9f8401036cc254a9c45cd8ca8
tree8a2016d4fc1ec5d6c3caed14cb1b9467895aa1ef
parent05ca21411eaaf3ea5e9cc9d82ecfaa8753f9f319
Add Qt::TimerType and the QTimer::timerType property

The timer type will control the accuracy of the timer. By default, all
timers are CoarseTimers, which allows for +/- 5% interval adjustment.
PreciseTimers will not have any interval adjustments, VeryCoarseTimers
will have intervals adjusted to full second resolution.

Use QTimer::setTimerType() or the QTimer::singleShot() overload to
specify the type.

QObject::startTimer() now takes a Qt::TimerType argument which defaults
to Qt::CoarseTimer. QBasicTimer::startTimer() gets an overload that
takes a Qt::TimerType argument. The argument is unused for now, since
the QAbstractEventDispatcher interface needs to change (done in a
separate commit).

Author: Thiago Macieira <thiago.macieira@nokia.com>
Change-Id: I3100da5aa1fe17ec30b8644897d0fe6ec4a07f52
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/global/qnamespace.h
src/corelib/global/qnamespace.qdoc
src/corelib/kernel/qbasictimer.cpp
src/corelib/kernel/qbasictimer.h
src/corelib/kernel/qobject.cpp
src/corelib/kernel/qobject.h
src/corelib/kernel/qtimer.cpp
src/corelib/kernel/qtimer.h