From 8d7c97d428cdf89c3419a4e13b62a9849feefce9 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 4 Apr 2019 16:46:41 +0200 Subject: Remove remaining Q_DECL_NOEXCEPT/Q_DECL_NOTHROW usage Change-Id: I91ac9e714a465cab226b211812aa46e8fe5ff2ab Reviewed-by: Thiago Macieira --- src/dbus/qdbusargument.h | 6 +++--- src/dbus/qdbusconnection.h | 6 +++--- src/dbus/qdbuserror.h | 6 +++--- src/dbus/qdbusextratypes.h | 14 +++++++------- src/dbus/qdbusintegrator_p.h | 4 ++-- src/dbus/qdbusmessage.h | 4 ++-- src/dbus/qdbuspendingcall.h | 4 ++-- src/dbus/qdbusunixfiledescriptor.h | 4 ++-- 8 files changed, 24 insertions(+), 24 deletions(-) (limited to 'src/dbus') diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h index 94a89a4e08..7f4bd269a9 100644 --- a/src/dbus/qdbusargument.h +++ b/src/dbus/qdbusargument.h @@ -77,13 +77,13 @@ public: QDBusArgument(); QDBusArgument(const QDBusArgument &other); #ifdef Q_COMPILER_RVALUE_REFS - QDBusArgument(QDBusArgument &&other) Q_DECL_NOTHROW : d(other.d) { other.d = nullptr; } - QDBusArgument &operator=(QDBusArgument &&other) Q_DECL_NOTHROW { swap(other); return *this; } + QDBusArgument(QDBusArgument &&other) noexcept : d(other.d) { other.d = nullptr; } + QDBusArgument &operator=(QDBusArgument &&other) noexcept { swap(other); return *this; } #endif QDBusArgument &operator=(const QDBusArgument &other); ~QDBusArgument(); - void swap(QDBusArgument &other) Q_DECL_NOTHROW { qSwap(d, other.d); } + void swap(QDBusArgument &other) noexcept { qSwap(d, other.d); } // used for marshalling (Qt -> D-BUS) QDBusArgument &operator<<(uchar arg); diff --git a/src/dbus/qdbusconnection.h b/src/dbus/qdbusconnection.h index 3711981f78..a880a7a939 100644 --- a/src/dbus/qdbusconnection.h +++ b/src/dbus/qdbusconnection.h @@ -132,13 +132,13 @@ public: explicit QDBusConnection(const QString &name); QDBusConnection(const QDBusConnection &other); #ifdef Q_COMPILER_RVALUE_REFS - QDBusConnection(QDBusConnection &&other) Q_DECL_NOTHROW : d(other.d) { other.d = nullptr; } - QDBusConnection &operator=(QDBusConnection &&other) Q_DECL_NOTHROW { swap(other); return *this; } + QDBusConnection(QDBusConnection &&other) noexcept : d(other.d) { other.d = nullptr; } + QDBusConnection &operator=(QDBusConnection &&other) noexcept { swap(other); return *this; } #endif QDBusConnection &operator=(const QDBusConnection &other); ~QDBusConnection(); - void swap(QDBusConnection &other) Q_DECL_NOTHROW { qSwap(d, other.d); } + void swap(QDBusConnection &other) noexcept { qSwap(d, other.d); } bool isConnected() const; QString baseService() const; diff --git a/src/dbus/qdbuserror.h b/src/dbus/qdbuserror.h index c264f62b7d..5a68a417c4 100644 --- a/src/dbus/qdbuserror.h +++ b/src/dbus/qdbuserror.h @@ -99,17 +99,17 @@ public: QDBusError(ErrorType error, const QString &message); QDBusError(const QDBusError &other); #ifdef Q_COMPILER_RVALUE_REFS - QDBusError(QDBusError &&other) Q_DECL_NOTHROW + QDBusError(QDBusError &&other) noexcept : code(other.code), msg(std::move(other.msg)), nm(std::move(other.nm)) {} - QDBusError &operator=(QDBusError &&other) Q_DECL_NOTHROW { swap(other); return *this; } + QDBusError &operator=(QDBusError &&other) noexcept { swap(other); return *this; } #endif QDBusError &operator=(const QDBusError &other); #ifndef QT_BOOTSTRAPPED QDBusError &operator=(const QDBusMessage &msg); #endif - void swap(QDBusError &other) Q_DECL_NOTHROW + void swap(QDBusError &other) noexcept { qSwap(code, other.code); qSwap(msg, other.msg); diff --git a/src/dbus/qdbusextratypes.h b/src/dbus/qdbusextratypes.h index 12961e2702..e2430ad6f2 100644 --- a/src/dbus/qdbusextratypes.h +++ b/src/dbus/qdbusextratypes.h @@ -59,7 +59,7 @@ class Q_DBUS_EXPORT QDBusObjectPath { QString m_path; public: - QDBusObjectPath() Q_DECL_NOTHROW : m_path() {} + QDBusObjectPath() noexcept : m_path() {} // compiler-generated copy/move constructor/assignment operators are ok! // compiler-generated destructor is ok! @@ -70,7 +70,7 @@ public: explicit QDBusObjectPath(QString &&p) : m_path(std::move(p)) { doCheck(); } #endif - void swap(QDBusObjectPath &other) Q_DECL_NOTHROW { qSwap(m_path, other.m_path); } + void swap(QDBusObjectPath &other) noexcept { qSwap(m_path, other.m_path); } inline void setPath(const QString &path); @@ -114,7 +114,7 @@ class Q_DBUS_EXPORT QDBusSignature { QString m_signature; public: - QDBusSignature() Q_DECL_NOTHROW : m_signature() {} + QDBusSignature() noexcept : m_signature() {} // compiler-generated copy/move constructor/assignment operators are ok! // compiler-generated destructor is ok! @@ -125,7 +125,7 @@ public: explicit QDBusSignature(QString &&sig) : m_signature(std::move(sig)) { doCheck(); } #endif - void swap(QDBusSignature &other) Q_DECL_NOTHROW { qSwap(m_signature, other.m_signature); } + void swap(QDBusSignature &other) noexcept { qSwap(m_signature, other.m_signature); } inline void setSignature(const QString &signature); @@ -168,16 +168,16 @@ class QDBusVariant { QVariant m_variant; public: - QDBusVariant() Q_DECL_NOTHROW : m_variant() {} + QDBusVariant() noexcept : m_variant() {} // compiler-generated copy/move constructor/assignment operators are ok! // compiler-generated destructor is ok! inline explicit QDBusVariant(const QVariant &variant); #ifdef Q_COMPILER_RVALUE_REFS - explicit QDBusVariant(QVariant &&v) Q_DECL_NOTHROW : m_variant(std::move(v)) {} + explicit QDBusVariant(QVariant &&v) noexcept : m_variant(std::move(v)) {} #endif - void swap(QDBusVariant &other) Q_DECL_NOTHROW { qSwap(m_variant, other.m_variant); } + void swap(QDBusVariant &other) noexcept { qSwap(m_variant, other.m_variant); } inline void setVariant(const QVariant &variant); diff --git a/src/dbus/qdbusintegrator_p.h b/src/dbus/qdbusintegrator_p.h index 0f7e00fde0..a6f7651c73 100644 --- a/src/dbus/qdbusintegrator_p.h +++ b/src/dbus/qdbusintegrator_p.h @@ -86,7 +86,7 @@ struct QDBusSlotCache int slotIdx; QVector metaTypes; - void swap(Data &other) Q_DECL_NOTHROW + void swap(Data &other) noexcept { qSwap(flags, other.flags); qSwap(slotIdx, other.slotIdx); @@ -96,7 +96,7 @@ struct QDBusSlotCache typedef QMultiHash Hash; Hash hash; - void swap(QDBusSlotCache &other) Q_DECL_NOTHROW { qSwap(hash, other.hash); } + void swap(QDBusSlotCache &other) noexcept { qSwap(hash, other.hash); } }; Q_DECLARE_SHARED(QDBusSlotCache::Data) Q_DECLARE_SHARED(QDBusSlotCache) diff --git a/src/dbus/qdbusmessage.h b/src/dbus/qdbusmessage.h index 23e04045d8..3e73db70de 100644 --- a/src/dbus/qdbusmessage.h +++ b/src/dbus/qdbusmessage.h @@ -69,12 +69,12 @@ public: QDBusMessage(); QDBusMessage(const QDBusMessage &other); #ifdef Q_COMPILER_RVALUE_REFS - QDBusMessage &operator=(QDBusMessage &&other) Q_DECL_NOTHROW { swap(other); return *this; } + QDBusMessage &operator=(QDBusMessage &&other) noexcept { swap(other); return *this; } #endif QDBusMessage &operator=(const QDBusMessage &other); ~QDBusMessage(); - void swap(QDBusMessage &other) Q_DECL_NOTHROW { qSwap(d_ptr, other.d_ptr); } + void swap(QDBusMessage &other) noexcept { qSwap(d_ptr, other.d_ptr); } static QDBusMessage createSignal(const QString &path, const QString &interface, const QString &name); diff --git a/src/dbus/qdbuspendingcall.h b/src/dbus/qdbuspendingcall.h index 24b1d6a7ca..c521b7d163 100644 --- a/src/dbus/qdbuspendingcall.h +++ b/src/dbus/qdbuspendingcall.h @@ -61,11 +61,11 @@ public: QDBusPendingCall(const QDBusPendingCall &other); ~QDBusPendingCall(); #ifdef Q_COMPILER_RVALUE_REFS - QDBusPendingCall &operator=(QDBusPendingCall &&other) Q_DECL_NOTHROW { swap(other); return *this; } + QDBusPendingCall &operator=(QDBusPendingCall &&other) noexcept { swap(other); return *this; } #endif QDBusPendingCall &operator=(const QDBusPendingCall &other); - void swap(QDBusPendingCall &other) Q_DECL_NOTHROW { qSwap(d, other.d); } + void swap(QDBusPendingCall &other) noexcept { qSwap(d, other.d); } #ifndef Q_CLANG_QDOC // pretend that they aren't here diff --git a/src/dbus/qdbusunixfiledescriptor.h b/src/dbus/qdbusunixfiledescriptor.h index ed3209ceda..6b264a6b86 100644 --- a/src/dbus/qdbusunixfiledescriptor.h +++ b/src/dbus/qdbusunixfiledescriptor.h @@ -62,12 +62,12 @@ public: explicit QDBusUnixFileDescriptor(int fileDescriptor); QDBusUnixFileDescriptor(const QDBusUnixFileDescriptor &other); #if defined(Q_COMPILER_RVALUE_REFS) - QDBusUnixFileDescriptor &operator=(QDBusUnixFileDescriptor &&other) Q_DECL_NOTHROW { swap(other); return *this; } + QDBusUnixFileDescriptor &operator=(QDBusUnixFileDescriptor &&other) noexcept { swap(other); return *this; } #endif QDBusUnixFileDescriptor &operator=(const QDBusUnixFileDescriptor &other); ~QDBusUnixFileDescriptor(); - void swap(QDBusUnixFileDescriptor &other) Q_DECL_NOTHROW + void swap(QDBusUnixFileDescriptor &other) noexcept { qSwap(d, other.d); } bool isValid() const; -- cgit v1.2.3