From dbf7706413bb8d624ac17b24398eaf4ef542ed6b Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 2 Apr 2019 10:59:52 +0200 Subject: Replace Q_DECL_NOEXCEPT with noexcept in QtGui Change-Id: I43803b88fea8083782d73ce157c466b022208740 Reviewed-by: Thiago Macieira --- src/gui/kernel/qevent.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/gui/kernel/qevent.h') diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index 2b1c6a6e31..de175bc334 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -811,14 +811,14 @@ class Q_GUI_EXPORT QPointingDeviceUniqueId Q_PROPERTY(qint64 numericId READ numericId CONSTANT) public: Q_ALWAYS_INLINE - Q_DECL_CONSTEXPR QPointingDeviceUniqueId() Q_DECL_NOTHROW : m_numericId(-1) {} + Q_DECL_CONSTEXPR QPointingDeviceUniqueId() noexcept : m_numericId(-1) {} // compiler-generated copy/move ctor/assignment operators are ok! // compiler-generated dtor is ok! static QPointingDeviceUniqueId fromNumericId(qint64 id); - Q_ALWAYS_INLINE Q_DECL_CONSTEXPR bool isValid() const Q_DECL_NOTHROW { return m_numericId != -1; } - qint64 numericId() const Q_DECL_NOTHROW; + Q_ALWAYS_INLINE Q_DECL_CONSTEXPR bool isValid() const noexcept { return m_numericId != -1; } + qint64 numericId() const noexcept; private: // TODO: for TUIO 2, or any other type of complex token ID, an internal @@ -829,10 +829,10 @@ private: Q_DECLARE_TYPEINFO(QPointingDeviceUniqueId, Q_MOVABLE_TYPE); template <> class QList {}; // to prevent instantiation: use QVector instead -Q_GUI_EXPORT bool operator==(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs) Q_DECL_NOTHROW; -inline bool operator!=(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs) Q_DECL_NOTHROW +Q_GUI_EXPORT bool operator==(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs) noexcept; +inline bool operator!=(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs) noexcept { return !operator==(lhs, rhs); } -Q_GUI_EXPORT uint qHash(QPointingDeviceUniqueId key, uint seed = 0) Q_DECL_NOTHROW; +Q_GUI_EXPORT uint qHash(QPointingDeviceUniqueId key, uint seed = 0) noexcept; @@ -856,10 +856,10 @@ public: explicit TouchPoint(int id = -1); TouchPoint(const TouchPoint &other); #ifdef Q_COMPILER_RVALUE_REFS - TouchPoint(TouchPoint &&other) Q_DECL_NOEXCEPT + TouchPoint(TouchPoint &&other) noexcept : d(nullptr) { qSwap(d, other.d); } - TouchPoint &operator=(TouchPoint &&other) Q_DECL_NOEXCEPT + TouchPoint &operator=(TouchPoint &&other) noexcept { qSwap(d, other.d); return *this; } #endif ~TouchPoint(); @@ -867,7 +867,7 @@ public: TouchPoint &operator=(const TouchPoint &other) { if ( d != other.d ) { TouchPoint copy(other); swap(copy); } return *this; } - void swap(TouchPoint &other) Q_DECL_NOEXCEPT + void swap(TouchPoint &other) noexcept { qSwap(d, other.d); } int id() const; -- cgit v1.2.3