summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusmarshaller.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-08-04 10:35:46 +0200
committerLars Knoll <lars.knoll@qt.io>2020-08-24 00:19:05 +0200
commit1697fbdf05ff643d617a9ba1614454926e86a3d9 (patch)
tree1c090fd9254ccedf33e724158e115157998304cf /src/dbus/qdbusmarshaller.cpp
parent92b37676328a960bc092b1f3834233c550376457 (diff)
Deprecate the static int based API in QMetaType
And remove one of the type id to name mapping that still existed in QMetaType. QMetaTypeInterface can provide that, so there's no need to have a second copy of the data. qMetaTypeTypeInternal() can still map all the names of all builtin types to ids. That functionality is for now still required by moc and can't be removed yet. Change-Id: Ib4f8e9c71e1e7d99d52da9e44477c9a1f1805e57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/dbus/qdbusmarshaller.cpp')
-rw-r--r--src/dbus/qdbusmarshaller.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/dbus/qdbusmarshaller.cpp b/src/dbus/qdbusmarshaller.cpp
index c80131f41d..4288cd75db 100644
--- a/src/dbus/qdbusmarshaller.cpp
+++ b/src/dbus/qdbusmarshaller.cpp
@@ -210,9 +210,9 @@ inline bool QDBusMarshaller::append(const QDBusVariant &arg)
if (!signature) {
qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. "
"Use qDBusRegisterMetaType to register it",
- QMetaType::typeName(id), id);
+ QMetaType(id).name(), id);
error(QLatin1String("Unregistered type %1 passed in arguments")
- .arg(QLatin1String(QMetaType::typeName(id))));
+ .arg(QLatin1String(QMetaType(id).name())));
return false;
}
@@ -252,9 +252,9 @@ inline QDBusMarshaller *QDBusMarshaller::beginArray(int id)
if (!signature) {
qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. "
"Use qDBusRegisterMetaType to register it",
- QMetaType::typeName(id), id);
+ QMetaType(id).name(), id);
error(QLatin1String("Unregistered type %1 passed in arguments")
- .arg(QLatin1String(QMetaType::typeName(id))));
+ .arg(QLatin1String(QMetaType(id).name())));
return this;
}
@@ -267,22 +267,22 @@ inline QDBusMarshaller *QDBusMarshaller::beginMap(int kid, int vid)
if (!ksignature) {
qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. "
"Use qDBusRegisterMetaType to register it",
- QMetaType::typeName(kid), kid);
+ QMetaType(kid).name(), kid);
error(QLatin1String("Unregistered type %1 passed in arguments")
- .arg(QLatin1String(QMetaType::typeName(kid))));
+ .arg(QLatin1String(QMetaType(kid).name())));
return this;
}
if (ksignature[1] != 0 || !QDBusUtil::isValidBasicType(*ksignature)) {
qWarning("QDBusMarshaller: type '%s' (%d) cannot be used as the key type in a D-BUS map.",
- QMetaType::typeName(kid), kid);
+ QMetaType(kid).name(), kid);
error(QLatin1String("Type %1 passed in arguments cannot be used as a key in a map")
- .arg(QLatin1String(QMetaType::typeName(kid))));
+ .arg(QLatin1String(QMetaType(kid).name())));
return this;
}
const char *vsignature = QDBusMetaType::typeToSignature( QVariant::Type(vid) );
if (!vsignature) {
- const char *typeName = QMetaType::typeName(vid);
+ const char *typeName = QMetaType(vid).name();
qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. "
"Use qDBusRegisterMetaType to register it",
typeName, vid);
@@ -416,9 +416,9 @@ bool QDBusMarshaller::appendVariantInternal(const QVariant &arg)
if (!signature) {
qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. "
"Use qDBusRegisterMetaType to register it",
- QMetaType::typeName(id), id);
+ QMetaType(id).name(), id);
error(QLatin1String("Unregistered type %1 passed in arguments")
- .arg(QLatin1String(QMetaType::typeName(id))));
+ .arg(QLatin1String(QMetaType(id).name())));
return false;
}