qt5base-lts/tests/auto/corelib
Laszlo Papp 8b56b8ed32 Add a remainingTime() method to the public interface of the QTimer class
It is an extension coming from the use case when you, for instance, need to
implement a countdown timer in client codes, and manually maintain a dedicated
variable for counting down with the help of yet another Timer. There might be
other use cases as well. The returned value is meant to be in milliseconds, as
the method documentation says, since it is reasonable, and consistent with the
rest (ie. the interval accessor).

The elapsed time is already being tracked inside the event dispatcher, thus the
effort is only exposing that for all platforms supported according to the
desired timer identifier, and propagating up to the QTimer public API. It is
done by using the QTimerInfoList class in the glib and unix dispatchers, and the
WinTimeInfo struct for the windows dispatcher.

It might be a good idea to to establish a QWinTimerInfo
(qtimerinfo_win{_p.h,cpp}) in the future for resembling the interface for
windows with the glib/unix management so that it would be consistent. That would
mean abstracting out a base class (~interface) for the timer info classes.
Something like that QAbstractTimerInfo.

Test: Build test only on (Arch)Linux, Windows and Mac. I have also run the unit
tests and they passed as well.

Change-Id: Ie37b3aff909313ebc92e511e27d029abb070f110
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-03 15:10:05 +02:00
..
animation Fix deadlock in QPropertyAnimation 2012-03-07 12:48:49 +01:00
codecs Move the UTF-8 data into a separate .cpp so I can use later 2012-03-23 11:22:40 +01:00
global Merge master into api_changes 2012-03-27 19:22:48 +02:00
io Revert to Qt4 behaviour that QUrl().isValid() == false 2012-03-30 01:19:59 +02:00
itemmodels Eliminate duplicate data row names from corelib autotests. 2012-02-14 06:19:16 +01:00
json Trailing comma should result in an error during JSON parsing 2012-03-12 21:38:51 +01:00
kernel Add a remainingTime() method to the public interface of the QTimer class 2012-04-03 15:10:05 +02:00
mimetypes Make comment() work in the C locale too. 2012-03-22 13:29:50 +01:00
plugin Fix QLibrary autotest for Windows 2012-02-28 12:45:28 +01:00
statemachine Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
thread Add a remainingTime() method to the public interface of the QTimer class 2012-04-03 15:10:05 +02:00
tools Introduce QArrayDataPointer::needsDetach 2012-04-02 16:34:21 +02:00
xml Eliminate duplicate data row names from corelib autotests. 2012-02-14 06:19:16 +01:00
corelib.pro Import QMimeType / QMimeDatabase into QtCore. 2012-02-18 22:19:43 +01:00