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/qdbusmisc.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/qdbusmisc.cpp')
-rw-r--r-- | src/dbus/qdbusmisc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dbus/qdbusmisc.cpp b/src/dbus/qdbusmisc.cpp index ba98184ded..c653e71097 100644 --- a/src/dbus/qdbusmisc.cpp +++ b/src/dbus/qdbusmisc.cpp @@ -164,7 +164,7 @@ int qDBusParametersForMethod(const QList<QByteArray> ¶meterTypes, QList<int> QByteArray basictype = type; basictype.truncate(type.length() - 1); - int id = QMetaType::type(basictype); + int id = QMetaType::fromName(basictype).id(); if (id == 0) { errorMsg = QLatin1String("Unregistered output type in parameter list: ") + QLatin1String(type); return -1; @@ -184,7 +184,7 @@ int qDBusParametersForMethod(const QList<QByteArray> ¶meterTypes, QList<int> if (type.startsWith("QVector<")) type = "QList<" + type.mid(sizeof("QVector<") - 1); - int id = QMetaType::type(type); + int id = QMetaType::fromName(type).id(); #ifdef QT_BOOTSTRAPPED // in bootstrap mode QDBusMessage isn't included, thus we need to resolve it manually here if (type == "QDBusMessage") { |