diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-08-04 10:35:46 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-08-24 00:19:05 +0200 |
commit | 1697fbdf05ff643d617a9ba1614454926e86a3d9 (patch) | |
tree | 1c090fd9254ccedf33e724158e115157998304cf /src/dbus/qdbusxmlgenerator.cpp | |
parent | 92b37676328a960bc092b1f3834233c550376457 (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/qdbusxmlgenerator.cpp')
-rw-r--r-- | src/dbus/qdbusxmlgenerator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dbus/qdbusxmlgenerator.cpp b/src/dbus/qdbusxmlgenerator.cpp index 97ce3dc910..7afeb66e09 100644 --- a/src/dbus/qdbusxmlgenerator.cpp +++ b/src/dbus/qdbusxmlgenerator.cpp @@ -114,7 +114,7 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method accessAsString(mp.isReadable(), mp.isWritable())); if (QDBusMetaType::signatureToType(signature) == QMetaType::UnknownType) { - const char *typeName = QMetaType::typeName(typeId); + const char *typeName = QMetaType(typeId).name(); retval += QLatin1String(">\n <annotation name=\"org.qtproject.QtDBus.QtTypeName\" value=\"%3\"/>\n </property>\n") .arg(typeNameToXml(typeName)); } else { @@ -163,9 +163,9 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method // do we need to describe this argument? if (QDBusMetaType::signatureToType(typeName) == QMetaType::UnknownType) xml += QLatin1String(" <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"%1\"/>\n") - .arg(typeNameToXml(QMetaType::typeName(typeId))); + .arg(typeNameToXml(QMetaType(typeId).name())); } else { - qWarning() << "Unsupported return type" << typeId << QMetaType::typeName(typeId) << "in method" << mm.name(); + qWarning() << "Unsupported return type" << typeId << QMetaType(typeId).name() << "in method" << mm.name(); continue; } } @@ -209,7 +209,7 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method // do we need to describe this argument? if (QDBusMetaType::signatureToType(signature) == QMetaType::UnknownType) { - const char *typeName = QMetaType::typeName(types.at(j)); + const char *typeName = QMetaType(types.at(j)).name(); xml += QString::fromLatin1(" <annotation name=\"org.qtproject.QtDBus.QtTypeName.%1%2\" value=\"%3\"/>\n") .arg(isOutput ? QLatin1String("Out") : QLatin1String("In")) .arg(isOutput && !isSignal ? j - inputCount : j - 1) |