From 1697fbdf05ff643d617a9ba1614454926e86a3d9 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 4 Aug 2020 10:35:46 +0200 Subject: 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 --- src/dbus/qdbusmarshaller.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/dbus/qdbusmarshaller.cpp') 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; } -- cgit v1.2.3