diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp index 3e7033451ea..63fb6f3efbd 100644 --- a/src/corelib/thread/qmutex.cpp +++ b/src/corelib/thread/qmutex.cpp @@ -276,7 +276,7 @@ bool QMutex::tryLock(int timeout) QT_MUTEX_LOCK_NOEXCEPT returns \c false */ -/*! \fn bool QMutex::try_lock_for(std::chrono::duration duration) +/*! \fn template bool QMutex::try_lock_for(std::chrono::duration duration) \since 5.8 Attempts to lock the mutex. This function returns \c true if the lock @@ -300,7 +300,7 @@ bool QMutex::tryLock(int timeout) QT_MUTEX_LOCK_NOEXCEPT \sa lock(), unlock() */ -/*! \fn bool QMutex::try_lock_until(std::chrono::time_point timePoint) +/*! \fn template bool QMutex::try_lock_until(std::chrono::time_point timePoint) \since 5.8 Attempts to lock the mutex. This function returns \c true if the lock diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h index 3dff3635411..7cda53db5f7 100644 --- a/src/corelib/thread/qmutex.h +++ b/src/corelib/thread/qmutex.h @@ -139,7 +139,7 @@ public: // Lockable concept bool try_lock() QT_MUTEX_LOCK_NOEXCEPT { return tryLock(); } -#if QT_HAS_INCLUDE() +#if QT_HAS_INCLUDE() || defined(Q_CLANG_QDOC) // TimedLockable concept template bool try_lock_for(std::chrono::duration duration)