summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtimer.cpp
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2024-08-03 03:46:21 +0300
committerAhmad Samir <a.samirh78@gmail.com>2024-08-03 15:26:31 +0300
commit46b8da642b9016c84d0cba12dab9bae3fba24ae4 (patch)
tree21daddd235ba7a3dc18d1de2683db7a2c3fc0b2d /src/corelib/kernel/qtimer.cpp
parent69c510d6bcc52ac133a82d7a9493ffba037c4521 (diff)
Q{Chrono,}Timer: de-duplicate API docs
Pick-to: 6.8 Change-Id: Ib88d89e5f8dae4a834467c05e2e5fa6983e7cd76 Reviewed-by: André Hartmann <aha_1980@gmx.de>
Diffstat (limited to 'src/corelib/kernel/qtimer.cpp')
-rw-r--r--src/corelib/kernel/qtimer.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index 362285e3694..f2311363781 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -202,10 +202,14 @@ Qt::TimerId QTimer::id() const
Starts or restarts the timer with the timeout specified in \l interval.
+//! [stop-restart-timer]
If the timer is already running, it will be
\l{QTimer::stop()}{stopped} and restarted.
+//! [stop-restart-timer]
+//! [singleshot-activation]
If \l singleShot is true, the timer will be activated only once.
+//! [singleshot-activation]
*/
void QTimer::start()
{
@@ -224,11 +228,10 @@ void QTimer::start()
Starts or restarts the timer with a timeout interval of \a msec
milliseconds.
- If the timer is already running, it will be
- \l{QTimer::stop()}{stopped} and restarted.
+ \include qtimer.cpp stop-restart-timer
- If \l singleShot is true, the timer will be activated only once. This is
- equivalent to:
+ \include qtimer.cpp singleshot-activation
+ This is equivalent to:
\code
timer.setInterval(msec);
@@ -521,11 +524,10 @@ void QTimer::singleShot(std::chrono::milliseconds msec, Qt::TimerType timerType,
Starts or restarts the timer with a timeout of duration \a msec milliseconds.
- If the timer is already running, it will be
- \l{QTimer::stop()}{stopped} and restarted.
+ \include qtimer.cpp stop-restart-timer
- If \l singleShot is true, the timer will be activated only once. This is
- equivalent to:
+ \include qtimer.cpp singleshot-activation
+ This is equivalent to:
\code
timer.setInterval(msec);