diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-03 09:56:49 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-09-05 17:51:10 +0200 |
commit | 1cf08cbc5b9b6beb49c26efb0a452b5bc7b7cd40 (patch) | |
tree | 6e275ba9ab1882db77ccb73697215e144e98bff4 | |
parent | 996e08734e14671c2aa17519df658aac086e57ca (diff) | |
download | qtbase-1cf08cbc5b9b6beb49c26efb0a452b5bc7b7cd40.tar.gz |
Cleanup a ### Qt 6
Change-Id: If9dd04e25ddc5164cc23ac7d5684254e38b7eda6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
-rw-r--r-- | src/dbus/qdbusargument.h | 9 | ||||
-rw-r--r-- | src/dbus/qdbuspendingreply.h | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h index cfa66d348e..721ac41b3c 100644 --- a/src/dbus/qdbusargument.h +++ b/src/dbus/qdbusargument.h @@ -156,15 +156,14 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE(QDBusArgument) QT_BEGIN_NAMESPACE -// ### Qt6: remove the defaulted T * = nullptr from these two (MSVC6 work-around): -template<typename T> inline T qdbus_cast(const QDBusArgument &arg, T * = nullptr) +template<typename T> inline T qdbus_cast(const QDBusArgument &arg) { T item; arg >> item; return item; } -template<typename T> inline T qdbus_cast(const QVariant &v, T * = nullptr) +template<typename T> inline T qdbus_cast(const QVariant &v) { int id = v.userType(); if (id == qMetaTypeId<QDBusArgument>()) @@ -174,13 +173,13 @@ template<typename T> inline T qdbus_cast(const QVariant &v, T * = nullptr) } // specialize for QVariant, allowing it to be used in place of QDBusVariant -template<> inline QVariant qdbus_cast<QVariant>(const QDBusArgument &arg, QVariant *) +template<> inline QVariant qdbus_cast<QVariant>(const QDBusArgument &arg) { QDBusVariant item; arg >> item; return item.variant(); } -template<> inline QVariant qdbus_cast<QVariant>(const QVariant &v, QVariant *) +template<> inline QVariant qdbus_cast<QVariant>(const QVariant &v) { return qdbus_cast<QDBusVariant>(v).variant(); } diff --git a/src/dbus/qdbuspendingreply.h b/src/dbus/qdbuspendingreply.h index 9d25115a67..62e955a82b 100644 --- a/src/dbus/qdbuspendingreply.h +++ b/src/dbus/qdbuspendingreply.h @@ -156,7 +156,7 @@ public: { static_assert(Index >= 0 && Index < Count, "Index out of bounds"); typedef typename Select<Index>::Type ResultType; - return qdbus_cast<ResultType>(argumentAt(Index), nullptr); + return qdbus_cast<ResultType>(argumentAt(Index)); } #endif |