summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtimer.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2024-08-28 15:22:20 +0200
committerMarc Mutz <marc.mutz@qt.io>2024-08-29 01:03:02 +0200
commit65a249715941bf6b6ecc980d3f865f367f66522d (patch)
treed4f0000afa2411cd74493874eb5cf6da8f7b11cd /src/corelib/kernel/qtimer.h
parent25b8d3743455bd2a4a327e1068fc83acb2f1c481 (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.h')
-rw-r--r--src/corelib/kernel/qtimer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h
index 06e90ac52ef..cc4720a3d05 100644
--- a/src/corelib/kernel/qtimer.h
+++ b/src/corelib/kernel/qtimer.h
@@ -144,6 +144,8 @@ private:
Q_DECLARE_PRIVATE(QTimer)
friend class QChronoTimer;
+ static std::chrono::nanoseconds from_msecs(std::chrono::milliseconds);
+
inline int startTimer(int){ return -1;}
inline void killTimer(int){}