diff options
Diffstat (limited to 'src/corelib/mimetypes/qmimetype.h')
-rw-r--r-- | src/corelib/mimetypes/qmimetype.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/corelib/mimetypes/qmimetype.h b/src/corelib/mimetypes/qmimetype.h index 8287f1434b..6d6f9eb488 100644 --- a/src/corelib/mimetypes/qmimetype.h +++ b/src/corelib/mimetypes/qmimetype.h @@ -55,7 +55,7 @@ class QMimeTypePrivate; class QStringList; class QMimeType; -Q_CORE_EXPORT uint qHash(const QMimeType &key, uint seed = 0) Q_DECL_NOTHROW; +Q_CORE_EXPORT uint qHash(const QMimeType &key, uint seed = 0) noexcept; class Q_CORE_EXPORT QMimeType { @@ -78,10 +78,8 @@ public: QMimeType(); QMimeType(const QMimeType &other); QMimeType &operator=(const QMimeType &other); -#ifdef Q_COMPILER_RVALUE_REFS - QMimeType &operator=(QMimeType &&other) Q_DECL_NOTHROW { swap(other); return *this; } -#endif - void swap(QMimeType &other) Q_DECL_NOTHROW + QMimeType &operator=(QMimeType &&other) noexcept { swap(other); return *this; } + void swap(QMimeType &other) noexcept { qSwap(d, other.d); } @@ -121,7 +119,7 @@ protected: friend class QMimeXMLProvider; friend class QMimeBinaryProvider; friend class QMimeTypePrivate; - friend Q_CORE_EXPORT uint qHash(const QMimeType &key, uint seed) Q_DECL_NOTHROW; + friend Q_CORE_EXPORT uint qHash(const QMimeType &key, uint seed) noexcept; QExplicitlySharedDataPointer<QMimeTypePrivate> d; }; |