diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2024-02-13 22:47:47 -0800 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2024-03-13 17:29:12 -0800 |
| commit | af6afad3b390c0ed7de6d3c4314cc394d8f8e2c2 (patch) | |
| tree | aeb28f3603f6e42c9d196fe3720c46217f939a22 /src/corelib/kernel/qtimer.cpp | |
| parent | d18d8a7ad1f69b2e65de114d9a3edc23d56da30e (diff) | |
Short-live QAbstractEventDispatcherV2
This class is a temporary hack to enable transition to an API based on
std::chrono for the Qt event dispatcher. In Qt 7, it will be merged with
QAbstractEventDispatcher, replacing the pure virtuals there with the
ones defined here.
The new API differs from V1 in the following ways:
- uses Qt::TimerId instead of int to identify timer IDs, so we can't
accidentally confuse them with something else
- uses Duration (nanoseconds) to specify the interval, instead of a mix
of int and qint64
- add the missing const to remainingTime()
- rename registeredTimers() to timersForObject() (I'd have kept the
original name but we can't overload the name if the parameters are
exactly the same; we could have used QT6_DECL_NEW_OVERLOAD_TAIL, but
I think the new name is actually better)
Because the old API was mixing int and qint64, we didn't officially
support any timer for more than 2^31 ms (~24.85 days). This should
extend the valid range to 292 years once the dispatchers are ported
over.
Change-Id: I83dda2d36c904517b3c0fffd17b3a7e0afef4b59
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Diffstat (limited to 'src/corelib/kernel/qtimer.cpp')
0 files changed, 0 insertions, 0 deletions
