diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-01-08 15:03:39 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-01-09 12:05:11 +0100 |
commit | 3fc9f97d61f5cf6a5d4941ddb4b6cd94136dc646 (patch) | |
tree | 2a36c0d97d4861293a2600dad344c1a37a6cb589 /src/corelib/thread/qmutex.h | |
parent | 7bd3d4591a126cd99f797f1a9f83c966547e29e1 (diff) |
QMutex/QReadWriteLock: mark bootstrap implementations nothrow
This is primarily to get a cleaner build of src/tools
under -Wnoexcept.
Change-Id: I0dea21e70aad56b25675fc59fac0327b55ee83e3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qmutex.h')
-rw-r--r-- | src/corelib/thread/qmutex.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h index 626ba0b1bb..acbd9f32d1 100644 --- a/src/corelib/thread/qmutex.h +++ b/src/corelib/thread/qmutex.h @@ -176,12 +176,12 @@ class Q_CORE_EXPORT QMutex public: enum RecursionMode { NonRecursive, Recursive }; - inline explicit QMutex(RecursionMode mode = NonRecursive) { Q_UNUSED(mode); } + inline explicit QMutex(RecursionMode mode = NonRecursive) Q_DECL_NOTHROW { Q_UNUSED(mode); } - inline void lock() {} - inline bool tryLock(int timeout = 0) { Q_UNUSED(timeout); return true; } - inline void unlock() {} - inline bool isRecursive() { return true; } + inline void lock() Q_DECL_NOTHROW {} + inline bool tryLock(int timeout = 0) Q_DECL_NOTHROW { Q_UNUSED(timeout); return true; } + inline void unlock() Q_DECL_NOTHROW {} + inline bool isRecursive() Q_DECL_NOTHROW { return true; } private: Q_DISABLE_COPY(QMutex) @@ -190,12 +190,12 @@ private: class Q_CORE_EXPORT QMutexLocker { public: - inline explicit QMutexLocker(QMutex *) {} - inline ~QMutexLocker() {} + inline explicit QMutexLocker(QMutex *) Q_DECL_NOTHROW {} + inline ~QMutexLocker() Q_DECL_NOTHROW {} - inline void unlock() {} - void relock() {} - inline QMutex *mutex() const { return 0; } + inline void unlock() Q_DECL_NOTHROW {} + void relock() Q_DECL_NOTHROW {} + inline QMutex *mutex() const Q_DECL_NOTHROW { return Q_NULLPTR; } private: Q_DISABLE_COPY(QMutexLocker) |