diff options
Diffstat (limited to 'src/dbus/qdbusargument.h')
-rw-r--r-- | src/dbus/qdbusargument.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h index a6d4e9cd25..7f4bd269a9 100644 --- a/src/dbus/qdbusargument.h +++ b/src/dbus/qdbusargument.h @@ -77,13 +77,13 @@ public: QDBusArgument(); QDBusArgument(const QDBusArgument &other); #ifdef Q_COMPILER_RVALUE_REFS - QDBusArgument(QDBusArgument &&other) Q_DECL_NOTHROW : d(other.d) { other.d = nullptr; } - QDBusArgument &operator=(QDBusArgument &&other) Q_DECL_NOTHROW { swap(other); return *this; } + QDBusArgument(QDBusArgument &&other) noexcept : d(other.d) { other.d = nullptr; } + QDBusArgument &operator=(QDBusArgument &&other) noexcept { swap(other); return *this; } #endif QDBusArgument &operator=(const QDBusArgument &other); ~QDBusArgument(); - void swap(QDBusArgument &other) Q_DECL_NOTHROW { qSwap(d, other.d); } + void swap(QDBusArgument &other) noexcept { qSwap(d, other.d); } // used for marshalling (Qt -> D-BUS) QDBusArgument &operator<<(uchar arg); @@ -158,22 +158,15 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE(QDBusArgument) QT_BEGIN_NAMESPACE -template<typename T> inline T qdbus_cast(const QDBusArgument &arg -#ifndef Q_QDOC -, T * = nullptr -#endif - ) +// ### Qt6: remove the defaulted T * = nullptr from these two (MSVC6 work-around): +template<typename T> inline T qdbus_cast(const QDBusArgument &arg, T * = nullptr) { T item; arg >> item; return item; } -template<typename T> inline T qdbus_cast(const QVariant &v -#ifndef Q_QDOC -, T * = nullptr -#endif - ) +template<typename T> inline T qdbus_cast(const QVariant &v, T * = nullptr) { int id = v.userType(); if (id == qMetaTypeId<QDBusArgument>()) |