From 321d6dda759841a16a4e21d7e3bbbfc89504bee4 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 26 Jun 2014 12:46:57 +0200 Subject: Fix QMutex documentation saying some function are static while they are not MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qdoc only see a fake QMutex class (the same as the one built in bootstrap) But that fake QMutex had static member while the normal QMutex class has non static member. QMutexLocker::mutex is also a const function in the real QMutexLocker Task-number: QTBUG-38522 Change-Id: I220434ffc6a9e990029f770e2536ecb55b4e2182 Reviewed-by: Martin Smith Reviewed-by: Jędrzej Nowacki --- src/corelib/thread/qmutex.cpp | 2 +- src/corelib/thread/qmutex.h | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp index fe5beb1c01..5e3f3a1cab 100644 --- a/src/corelib/thread/qmutex.cpp +++ b/src/corelib/thread/qmutex.cpp @@ -380,7 +380,7 @@ bool QBasicMutex::isRecursive() */ /*! - \fn QMutex *QMutexLocker::mutex() + \fn QMutex *QMutexLocker::mutex() const Returns the mutex on which the QMutexLocker is operating. diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h index 0ecc96a9b1..333865014b 100644 --- a/src/corelib/thread/qmutex.h +++ b/src/corelib/thread/qmutex.h @@ -186,10 +186,10 @@ public: inline explicit QMutex(RecursionMode mode = NonRecursive) { Q_UNUSED(mode); } - static inline void lock() {} - static inline bool tryLock(int timeout = 0) { Q_UNUSED(timeout); return true; } - static inline void unlock() {} - static inline bool isRecursive() { return true; } + inline void lock() {} + inline bool tryLock(int timeout = 0) { Q_UNUSED(timeout); return true; } + inline void unlock() {} + inline bool isRecursive() { return true; } private: Q_DISABLE_COPY(QMutex) @@ -201,9 +201,9 @@ public: inline explicit QMutexLocker(QMutex *) {} inline ~QMutexLocker() {} - static inline void unlock() {} - static void relock() {} - static inline QMutex *mutex() { return 0; } + inline void unlock() {} + void relock() {} + inline QMutex *mutex() const { return 0; } private: Q_DISABLE_COPY(QMutexLocker) -- cgit v1.2.3