diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2024-08-28 15:22:20 +0200 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2024-08-29 01:03:02 +0200 |
| commit | 65a249715941bf6b6ecc980d3f865f367f66522d (patch) | |
| tree | d4f0000afa2411cd74493874eb5cf6da8f7b11cd /src/corelib/kernel/qtimer.cpp | |
| parent | 25b8d3743455bd2a4a327e1068fc83acb2f1c481 (diff) | |
Make from_msecs a QTimer class-static again
It will need to be called from removed_api.cpp once we widen
QTimer::singleShot() from ms to ns.
Don't use the QAbstractEventDispatcher::Duration typedef in qtimer.h
to avoid including the resp. header. Keep the typedef as the return
value on the definition of from_msecs(), though, as a static assertion
that they're identical.
Pick-to: 6.8
Task-number: QTBUG-128426
Change-Id: Ib59895f4441e92813fe39778bb3836b039fdfbf0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qtimer.cpp')
| -rw-r--r-- | src/corelib/kernel/qtimer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp index 9703d810ee9..93a2ad6d07d 100644 --- a/src/corelib/kernel/qtimer.cpp +++ b/src/corelib/kernel/qtimer.cpp @@ -290,7 +290,8 @@ void QTimer::timerEvent(QTimerEvent *e) } } -static QAbstractEventDispatcher::Duration from_msecs(std::chrono::milliseconds ms) +QAbstractEventDispatcher::Duration // statically asserts that Duration is nanoseconds +QTimer::from_msecs(std::chrono::milliseconds ms) { using Duration = QAbstractEventDispatcher::Duration; |
