From a1e62e7ba14b00ac7c361936a18e7bc42bf1286d Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 2 Apr 2019 10:54:54 +0200 Subject: Replace Q_DECL_NOEXCEPT with noexcept in corelib In preparation of Qt6 move away from pre-C++11 macros. Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3 Reviewed-by: Thiago Macieira --- src/corelib/plugin/quuid.h | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/corelib/plugin/quuid.h') diff --git a/src/corelib/plugin/quuid.h b/src/corelib/plugin/quuid.h index 08a1843640..713ca070c8 100644 --- a/src/corelib/plugin/quuid.h +++ b/src/corelib/plugin/quuid.h @@ -93,13 +93,13 @@ public: #if defined(Q_COMPILER_UNIFORM_INIT) && !defined(Q_CLANG_QDOC) - Q_DECL_CONSTEXPR QUuid() Q_DECL_NOTHROW : data1(0), data2(0), data3(0), data4{0,0,0,0,0,0,0,0} {} + Q_DECL_CONSTEXPR QUuid() noexcept : data1(0), data2(0), data3(0), data4{0,0,0,0,0,0,0,0} {} Q_DECL_CONSTEXPR QUuid(uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, - uchar b4, uchar b5, uchar b6, uchar b7, uchar b8) Q_DECL_NOTHROW + uchar b4, uchar b5, uchar b6, uchar b7, uchar b8) noexcept : data1(l), data2(w1), data3(w2), data4{b1, b2, b3, b4, b5, b6, b7, b8} {} #else - QUuid() Q_DECL_NOTHROW + QUuid() noexcept { data1 = 0; data2 = 0; @@ -107,7 +107,7 @@ public: for(int i = 0; i < 8; i++) data4[i] = 0; } - QUuid(uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8) Q_DECL_NOTHROW + QUuid(uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8) noexcept { data1 = l; data2 = w1; @@ -124,8 +124,8 @@ public: #endif QUuid(const QString &); - static QUuid fromString(QStringView string) Q_DECL_NOTHROW; - static QUuid fromString(QLatin1String string) Q_DECL_NOTHROW; + static QUuid fromString(QStringView string) noexcept; + static QUuid fromString(QLatin1String string) noexcept; QUuid(const char *); QString toString() const; QString toString(StringFormat mode) const; // ### Qt6: merge with previous @@ -134,9 +134,9 @@ public: QByteArray toByteArray(StringFormat mode) const; // ### Qt6: merge with previous QByteArray toRfc4122() const; static QUuid fromRfc4122(const QByteArray &); - bool isNull() const Q_DECL_NOTHROW; + bool isNull() const noexcept; - Q_DECL_RELAXED_CONSTEXPR bool operator==(const QUuid &orig) const Q_DECL_NOTHROW + Q_DECL_RELAXED_CONSTEXPR bool operator==(const QUuid &orig) const noexcept { if (data1 != orig.data1 || data2 != orig.data2 || data3 != orig.data3) @@ -149,24 +149,24 @@ public: return true; } - Q_DECL_RELAXED_CONSTEXPR bool operator!=(const QUuid &orig) const Q_DECL_NOTHROW + Q_DECL_RELAXED_CONSTEXPR bool operator!=(const QUuid &orig) const noexcept { return !(*this == orig); } - bool operator<(const QUuid &other) const Q_DECL_NOTHROW; - bool operator>(const QUuid &other) const Q_DECL_NOTHROW; + bool operator<(const QUuid &other) const noexcept; + bool operator>(const QUuid &other) const noexcept; #if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC) // On Windows we have a type GUID that is used by the platform API, so we // provide convenience operators to cast from and to this type. #if defined(Q_COMPILER_UNIFORM_INIT) && !defined(Q_CLANG_QDOC) - Q_DECL_CONSTEXPR QUuid(const GUID &guid) Q_DECL_NOTHROW + Q_DECL_CONSTEXPR QUuid(const GUID &guid) noexcept : data1(guid.Data1), data2(guid.Data2), data3(guid.Data3), data4{guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]} {} #else - QUuid(const GUID &guid) Q_DECL_NOTHROW + QUuid(const GUID &guid) noexcept { data1 = guid.Data1; data2 = guid.Data2; @@ -176,24 +176,24 @@ public: } #endif - Q_DECL_RELAXED_CONSTEXPR QUuid &operator=(const GUID &guid) Q_DECL_NOTHROW + Q_DECL_RELAXED_CONSTEXPR QUuid &operator=(const GUID &guid) noexcept { *this = QUuid(guid); return *this; } - Q_DECL_RELAXED_CONSTEXPR operator GUID() const Q_DECL_NOTHROW + Q_DECL_RELAXED_CONSTEXPR operator GUID() const noexcept { GUID guid = { data1, data2, data3, { data4[0], data4[1], data4[2], data4[3], data4[4], data4[5], data4[6], data4[7] } }; return guid; } - Q_DECL_RELAXED_CONSTEXPR bool operator==(const GUID &guid) const Q_DECL_NOTHROW + Q_DECL_RELAXED_CONSTEXPR bool operator==(const GUID &guid) const noexcept { return *this == QUuid(guid); } - Q_DECL_RELAXED_CONSTEXPR bool operator!=(const GUID &guid) const Q_DECL_NOTHROW + Q_DECL_RELAXED_CONSTEXPR bool operator!=(const GUID &guid) const noexcept { return !(*this == guid); } @@ -216,8 +216,8 @@ public: } - QUuid::Variant variant() const Q_DECL_NOTHROW; - QUuid::Version version() const Q_DECL_NOTHROW; + QUuid::Variant variant() const noexcept; + QUuid::Version version() const noexcept; #if defined(Q_OS_DARWIN) || defined(Q_CLANG_QDOC) static QUuid fromCFUUID(CFUUIDRef uuid); @@ -243,11 +243,11 @@ Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QUuid &); Q_CORE_EXPORT QDebug operator<<(QDebug, const QUuid &); #endif -Q_CORE_EXPORT uint qHash(const QUuid &uuid, uint seed = 0) Q_DECL_NOTHROW; +Q_CORE_EXPORT uint qHash(const QUuid &uuid, uint seed = 0) noexcept; -inline bool operator<=(const QUuid &lhs, const QUuid &rhs) Q_DECL_NOTHROW +inline bool operator<=(const QUuid &lhs, const QUuid &rhs) noexcept { return !(rhs < lhs); } -inline bool operator>=(const QUuid &lhs, const QUuid &rhs) Q_DECL_NOTHROW +inline bool operator>=(const QUuid &lhs, const QUuid &rhs) noexcept { return !(lhs < rhs); } QT_END_NAMESPACE -- cgit v1.2.3