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/tools/moc/generator.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/tools/moc/generator.cpp')
-rw-r--r-- | src/tools/moc/generator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index b09e567b59..7754771332 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -53,7 +53,7 @@ uint nameToBuiltinType(const QByteArray &name) if (name.isEmpty()) return 0; - uint tp = QMetaType::type(name.constData()); + uint tp = qMetaTypeTypeInternal(name.constData()); return tp < uint(QMetaType::User) ? tp : uint(QMetaType::UnknownType); } @@ -62,7 +62,7 @@ uint nameToBuiltinType(const QByteArray &name) */ bool isBuiltinType(const QByteArray &type) { - int id = QMetaType::type(type.constData()); + int id = qMetaTypeTypeInternal(type.constData()); if (id == QMetaType::UnknownType) return false; return (id < QMetaType::User); |