From 29513210dfaf4252c67d7142737e41491297911d Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 9 Jun 2014 10:54:27 +0200 Subject: Doc: QAtomicInteger first appeared in Qt 5.3 Change-Id: I900e5b0ec8291d34685cb545540a5a9f54551d05 Reviewed-by: Thiago Macieira --- src/corelib/thread/qatomic.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/thread') diff --git a/src/corelib/thread/qatomic.cpp b/src/corelib/thread/qatomic.cpp index 33e85c1505..b2043a45a1 100644 --- a/src/corelib/thread/qatomic.cpp +++ b/src/corelib/thread/qatomic.cpp @@ -58,6 +58,7 @@ \inmodule QtCore \brief The QAtomicInteger class provides platform-independent atomic operations on integers. \ingroup thread + \since 5.3 For atomic operations on pointers, see the QAtomicPointer class. -- cgit v1.2.3 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(-) (limited to 'src/corelib/thread') 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 From 6303307692c4ebdc3836f44da917d6b83ab3d4cc Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 26 Jun 2014 12:54:33 +0200 Subject: Add a comment stating QMutex::isRecursive should be made const in Qt6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I452b0764790112c59af77bc8d95f403ff37cbc4a Reviewed-by: Jędrzej Nowacki --- src/corelib/thread/qmutex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/thread') diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h index 333865014b..011555f904 100644 --- a/src/corelib/thread/qmutex.h +++ b/src/corelib/thread/qmutex.h @@ -77,7 +77,7 @@ public: return fastTryLock(); } - bool isRecursive(); + bool isRecursive(); //### Qt6: mark const private: inline bool fastTryLock() Q_DECL_NOTHROW { -- cgit v1.2.3