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/tools/qdatetime.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/corelib/tools/qdatetime.h') diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h index 43271b34ed..144fb9b28a 100644 --- a/src/corelib/tools/qdatetime.h +++ b/src/corelib/tools/qdatetime.h @@ -266,16 +266,16 @@ public: #if QT_CONFIG(timezone) QDateTime(const QDate &date, const QTime &time, const QTimeZone &timeZone); #endif // timezone - QDateTime(const QDateTime &other) Q_DECL_NOTHROW; - QDateTime(QDateTime &&other) Q_DECL_NOTHROW; + QDateTime(const QDateTime &other) noexcept; + QDateTime(QDateTime &&other) noexcept; ~QDateTime(); #ifdef Q_COMPILER_RVALUE_REFS - QDateTime &operator=(QDateTime &&other) Q_DECL_NOTHROW { swap(other); return *this; } + QDateTime &operator=(QDateTime &&other) noexcept { swap(other); return *this; } #endif - QDateTime &operator=(const QDateTime &other) Q_DECL_NOTHROW; + QDateTime &operator=(const QDateTime &other) noexcept; - void swap(QDateTime &other) Q_DECL_NOTHROW { qSwap(d.d, other.d.d); } + void swap(QDateTime &other) noexcept { qSwap(d.d, other.d.d); } bool isNull() const; bool isValid() const; @@ -366,8 +366,8 @@ public: static QDateTime fromSecsSinceEpoch(qint64 secs, const QTimeZone &timeZone); #endif - static qint64 currentMSecsSinceEpoch() Q_DECL_NOTHROW; - static qint64 currentSecsSinceEpoch() Q_DECL_NOTHROW; + static qint64 currentMSecsSinceEpoch() noexcept; + static qint64 currentSecsSinceEpoch() noexcept; #if defined(Q_OS_DARWIN) || defined(Q_QDOC) static QDateTime fromCFDate(CFDateRef date); @@ -410,8 +410,8 @@ Q_CORE_EXPORT QDebug operator<<(QDebug, const QDateTime &); // QDateTime is not noexcept for now -- to be revised once // timezone and calendaring support is added Q_CORE_EXPORT uint qHash(const QDateTime &key, uint seed = 0); -Q_CORE_EXPORT uint qHash(const QDate &key, uint seed = 0) Q_DECL_NOTHROW; -Q_CORE_EXPORT uint qHash(const QTime &key, uint seed = 0) Q_DECL_NOTHROW; +Q_CORE_EXPORT uint qHash(const QDate &key, uint seed = 0) noexcept; +Q_CORE_EXPORT uint qHash(const QTime &key, uint seed = 0) noexcept; QT_END_NAMESPACE -- cgit v1.2.3