diff options
Diffstat (limited to 'src/dbus/qdbuserror.h')
-rw-r--r-- | src/dbus/qdbuserror.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/dbus/qdbuserror.h b/src/dbus/qdbuserror.h index c264f62b7d..312bac71de 100644 --- a/src/dbus/qdbuserror.h +++ b/src/dbus/qdbuserror.h @@ -41,6 +41,7 @@ #define QDBUSERROR_H #include <QtDBus/qtdbusglobal.h> +#include <QtCore/qobjectdefs.h> #include <QtCore/qstring.h> #ifndef QT_NO_DBUS @@ -54,6 +55,7 @@ class QDBusMessage; class Q_DBUS_EXPORT QDBusError { + Q_GADGET public: enum ErrorType { NoError = 0, @@ -90,6 +92,7 @@ public: LastErrorType = InvalidMember #endif }; + Q_ENUM(ErrorType) QDBusError(); #ifndef QT_BOOTSTRAPPED @@ -98,18 +101,16 @@ public: #endif 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; } -#endif + QDBusError &operator=(QDBusError &&other) noexcept { swap(other); return *this; } 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); |