Marc Mutz e6ab7847a7 QTimer: make singleShot() have nanoseconds resolution [1/2]: old-style
Port the string-based singleShot() static methods from milliseconds to
nanoseconds resolution.

This matches what QChronoTimer provides, but we want to minimize
porting for users come Qt 7, so we don't want users to first have to
port to QChronoTimer::singleShot() and then back to
QTimer::singleShot(); we want them to continue to use QTimer.

The only reason QChronoTimer is a separate class from QTimer is that
the latter has an int interval property and we can't just port it to
milli- or nanoseconds chrono types if we want users to actually access
the extra range or precision afforded by the chrono types. But that's
not an issue for the singleShot() static methods, as they never return
an object that could be asked for its timeout.

The new-style static methods will be ported in a second step.

[ChangeLog][QtCore][QTimer] The singleShot() static methods now
operate with nanoseconds resolution, like QChronoTimer. The rest of
QTimer remains milliseconds; use QChronoTimer if you need a QTimer
with nanoseconds resolution of more than INT_MAX milliseconds
range. Beware overflow that may occur when passing large milliseconds
objects that may overflow nanoseconds::rep when converted.

Task-number: QTBUG-128426
Change-Id: I11e1ad8529c67b4018f6325ac408686799475823
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4e911bda295b53bc74cf1af26008b3e60181668d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 20:41:37 +00:00
2024-02-29 15:35:57 +01:00
2015-08-18 19:59:14 +00:00
2024-07-12 01:42:29 +00:00
2024-08-29 20:41:36 +00:00
2024-02-02 15:23:02 +00:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%