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/tools/moc/generator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tools') 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); -- cgit v1.2.3