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>bb10
parent
ebec918722
commit
00d972fa4f
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue