From 6ff2302a7f66eff9e423bc0612f740056812c791 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 10 Jul 2024 12:40:26 +0200 Subject: [PATCH] Doc: fix warnings from links by fully qualifying the target The link to QChronoTimer::singleShot seems to ambiguous for qdoc, as it's both a property and a method. But linking from startTimer to the QChronoTimer (and QBasicTimer) class rather than singleShot makes more sense anyway. Change-Id: I499b1008b8460d9529b8afd00b5dafbb314ceea1 Reviewed-by: Ivan Solovev (cherry picked from commit 6bbc9c714bf067d33ad2f487c552025aaa7278db) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/kernel/qchronotimer.cpp | 2 +- src/corelib/kernel/qobject.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/corelib/kernel/qchronotimer.cpp b/src/corelib/kernel/qchronotimer.cpp index a517c4446b4..0224b3328b6 100644 --- a/src/corelib/kernel/qchronotimer.cpp +++ b/src/corelib/kernel/qchronotimer.cpp @@ -251,7 +251,7 @@ void QChronoTimer::timerEvent(QTimerEvent *e) The default value for this property is \c false. - \sa interval, singleShot() + \sa interval, QChronoTimer::singleShot() */ void QChronoTimer::setSingleShot(bool singleShot) { diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 7a0b2ce82b5..4426e5f6c90 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -1811,7 +1811,7 @@ void QObjectPrivate::setThreadData_helper(QThreadData *currentData, QThreadData startTimer(std::chrono::milliseconds{interval}, timerType); \endcode - \sa timerEvent(), killTimer(), QChronoTimer::singleShot() + \sa timerEvent(), killTimer(), QChronoTimer, QBasicTimer */ int QObject::startTimer(int interval, Qt::TimerType timerType) @@ -1858,8 +1858,6 @@ int QObject::startTimer(int interval, Qt::TimerType timerType) events. There is also a QBasicTimer class that is more lightweight than QChronoTimer but less clumsy than using timer IDs directly. - \sa timerEvent(), killTimer(), QChronoTimer::singleShot() - \note Starting from Qt 6.8 the type of \a interval is \c std::chrono::nanoseconds, prior to that it was \c std::chrono::milliseconds. This change is backwards compatible with @@ -1871,6 +1869,7 @@ int QObject::startTimer(int interval, Qt::TimerType timerType) this method, for example: \snippet code/src_corelib_kernel_qobject.cpp invalid-timer-id + \sa timerEvent(), killTimer(), QChronoTimer, QBasicTimer */ int QObject::startTimer(std::chrono::nanoseconds interval, Qt::TimerType timerType) {