Details
-
Task
-
Resolution: Fixed
-
P1: Critical
-
None
-
5
-
25b8d3743 (dev), 65a249715 (dev), ee6b101ad (6.8), 92597843d (6.8), 6991e848e (dev), 4e911bda2 (dev), 6e5eb082c (dev), 2fb422828 (6.8), f8b3c1f0a (6.8), e6ab7847a (6.8), 870307789 (dev), 28161ab42 (6.8)
-
Foundation Sprint 115
Description
The new QChronoTimer class has singleShot() static methods that provide nanosecond resolution while QTimer has singleShot() static methods that take any Duration, but implicitly round (or truncate?) to millisecond resolution. That means the same calls compile, but behave differently.
Suggest to
- make QTimer::singleShot() have nanosecond resolution
- remove QChronoTimer::singleShot() static methods
Rationale for (2): We don't want two timer classes. QChronoTimer is a kludge that was necessary due to the existing QTimer::interval int property (chrono types have a larger range than int ms). So the expectation is that QChronoTimer becomes QTimer in Qt 7. The static methods don't have the problem with int setter and getters and so can remain on QTimer, so that users don't need to first port to QChronoTimer::singleShot() in Qt 6 and then back to QTimer::singleShot() in Qt 7.