summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-08-22 10:46:29 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-08-28 06:25:40 +0200
commit00d972fa4f458554cece7f66f1b43f00b0a5458c (patch)
tree273dfc690f906b69cb717e48ab413ed52e95ca8c /src
parentebec918722a283410624af6df38345b9dfc0b8f8 (diff)
QReadWriteLock QT_NO_THREAD shell: make API compatible with the regular one
- add missing explicit - drop static from member functions that aren't static in the regular version (ie. all functions) As a drive-by, remove redundant inline keyword where it doesn't cause wanton inconsistency with surrounding code. Change-Id: I5aed73c3afa85d98d97b57c2c1874b1a5e664960 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/thread/qreadwritelock.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/corelib/thread/qreadwritelock.h b/src/corelib/thread/qreadwritelock.h
index 139fde9214..3c1ed91b94 100644
--- a/src/corelib/thread/qreadwritelock.h
+++ b/src/corelib/thread/qreadwritelock.h
@@ -183,15 +183,15 @@ public:
inline explicit QReadWriteLock(RecursionMode = NonRecursive) noexcept { }
inline ~QReadWriteLock() { }
- static inline void lockForRead() noexcept { }
- static inline bool tryLockForRead() noexcept { return true; }
- static inline bool tryLockForRead(int timeout) noexcept { Q_UNUSED(timeout); return true; }
+ void lockForRead() noexcept { }
+ bool tryLockForRead() noexcept { return true; }
+ bool tryLockForRead(int timeout) noexcept { Q_UNUSED(timeout); return true; }
- static inline void lockForWrite() noexcept { }
- static inline bool tryLockForWrite() noexcept { return true; }
- static inline bool tryLockForWrite(int timeout) noexcept { Q_UNUSED(timeout); return true; }
+ void lockForWrite() noexcept { }
+ bool tryLockForWrite() noexcept { return true; }
+ bool tryLockForWrite(int timeout) noexcept { Q_UNUSED(timeout); return true; }
- static inline void unlock() noexcept { }
+ void unlock() noexcept { }
private:
Q_DISABLE_COPY(QReadWriteLock)
@@ -200,12 +200,12 @@ private:
class Q_CORE_EXPORT QReadLocker
{
public:
- inline QReadLocker(QReadWriteLock *) noexcept { }
+ inline explicit QReadLocker(QReadWriteLock *) noexcept { }
inline ~QReadLocker() noexcept { }
- static inline void unlock() noexcept { }
- static inline void relock() noexcept { }
- static inline QReadWriteLock *readWriteLock() noexcept { return nullptr; }
+ void unlock() noexcept { }
+ void relock() noexcept { }
+ QReadWriteLock *readWriteLock() noexcept { return nullptr; }
private:
Q_DISABLE_COPY(QReadLocker)
@@ -217,9 +217,9 @@ public:
inline explicit QWriteLocker(QReadWriteLock *) noexcept { }
inline ~QWriteLocker() noexcept { }
- static inline void unlock() noexcept { }
- static inline void relock() noexcept { }
- static inline QReadWriteLock *readWriteLock() noexcept { return nullptr; }
+ void unlock() noexcept { }
+ void relock() noexcept { }
+ QReadWriteLock *readWriteLock() noexcept { return nullptr; }
private:
Q_DISABLE_COPY(QWriteLocker)