diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-09 13:42:35 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-09-23 19:30:28 +0200 |
commit | 850d850c5af8ff77a4b9d53457ec6b1ba6c20cb3 (patch) | |
tree | 79af5853f71ca977c4e24eab609c0f07dcb04a7a /src/dbus/qdbusreply.cpp | |
parent | be714154fa3f9dd7f1a44952293eee037793e383 (diff) |
Use QMetaType instead of integer based type ids
Change the implementation of Qt DBus to use QMetaType directly
instead of integer based type ids.
Change-Id: I999023b58fa50dcc3504386467faf09874f7d2cf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/dbus/qdbusreply.cpp')
-rw-r--r-- | src/dbus/qdbusreply.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dbus/qdbusreply.cpp b/src/dbus/qdbusreply.cpp index a0556f6559..1a3278ff52 100644 --- a/src/dbus/qdbusreply.cpp +++ b/src/dbus/qdbusreply.cpp @@ -203,17 +203,17 @@ void qDBusReplyFill(const QDBusMessage &reply, QDBusError &error, QVariant &data return; } - if (reply.arguments().count() >= 1 && reply.arguments().at(0).userType() == data.userType()) { + if (reply.arguments().count() >= 1 && reply.arguments().at(0).metaType() == data.metaType()) { data = reply.arguments().at(0); return; } - const char *expectedSignature = QDBusMetaType::typeToSignature(data.userType()); + const char *expectedSignature = QDBusMetaType::typeToSignature(data.metaType()); const char *receivedType = nullptr; QByteArray receivedSignature; if (reply.arguments().count() >= 1) { - if (reply.arguments().at(0).userType() == QDBusMetaTypeId::argument()) { + if (reply.arguments().at(0).metaType() == QDBusMetaTypeId::argument()) { // compare signatures instead QDBusArgument arg = qvariant_cast<QDBusArgument>(reply.arguments().at(0)); receivedSignature = arg.currentSignature().toLatin1(); @@ -224,8 +224,8 @@ void qDBusReplyFill(const QDBusMessage &reply, QDBusError &error, QVariant &data } } else { // not an argument and doesn't match? - int type = reply.arguments().at(0).userType(); - receivedType = QMetaType(type).name(); + QMetaType type = reply.arguments().at(0).metaType(); + receivedType = type.name(); receivedSignature = QDBusMetaType::typeToSignature(type); } } |