summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-09-03 16:54:41 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-09-06 19:44:27 +0200
commiteb39b5fd36964aceff28266a169d1e223b785f16 (patch)
tree8309cf4f0d45df440a0b97382c93ea5ec9c418c3 /src/corelib/thread
parentc8dbb177f03bcd8e65b8fac1008fe276fada2c92 (diff)
Doc: fix qdoc warning from wrong function prototypes
std::chrono values are passed by const reference. Still warnings from undocumented parameters, but rephrasing the documentation doesn't make it better in this case, so perhaps qdoc needs a way to suppress the warning. Adding an \omit block where the parameters or return values are mentioned doesn't help. Change-Id: I7d495d73d8367d9d90dd33a4880ac7c978382d19 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qsemaphore.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/thread/qsemaphore.cpp b/src/corelib/thread/qsemaphore.cpp
index 23fded1cc0..cbabb43dc8 100644
--- a/src/corelib/thread/qsemaphore.cpp
+++ b/src/corelib/thread/qsemaphore.cpp
@@ -492,7 +492,7 @@ bool QSemaphore::tryAcquire(int n, int timeout)
*/
/*!
- \fn QSemaphore::try_acquire()
+ \fn bool QSemaphore::try_acquire()
\since 6.3
This function is provided for \c{std::counting_semaphore} compatibility.
@@ -503,7 +503,7 @@ bool QSemaphore::tryAcquire(int n, int timeout)
*/
/*!
- \fn template <typename Rep, typename Period> QSemaphore::try_acquire_for(std::chrono::duration<Rep, Period> timeout)
+ \fn template <typename Rep, typename Period> bool QSemaphore::try_acquire_for(const std::chrono::duration<Rep, Period> &timeout)
\since 6.3
This function is provided for \c{std::counting_semaphore} compatibility.
@@ -514,12 +514,12 @@ bool QSemaphore::tryAcquire(int n, int timeout)
*/
/*!
- \fn template <typename Clock, typename Duration> QSemaphore::try_acquire_until(std::chrono::time_point<Clock, Duration> timeout)
+ \fn template <typename Clock, typename Duration> bool QSemaphore::try_acquire_until(const std::chrono::time_point<Clock, Duration> &tp)
\since 6.3
This function is provided for \c{std::counting_semaphore} compatibility.
- It is equivalent to calling \c{tryAcquire(1, timeout - Clock::now())},
+ It is equivalent to calling \c{tryAcquire(1, tp - Clock::now())},
which means that adjustments to \c{Clock} are ignored while waiting.
\sa tryAcquire(), try_acquire(), try_acquire_for()