summaryrefslogtreecommitdiffstats
diff options
authorJoni Poikelin <joni.poikelin@qt.io>2025-05-08 08:54:39 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2025-05-09 04:40:42 +0000
commitda6ec4a5767f59406ac9949694114b86912f0dd3 (patch)
tree99fc7b45e7ba60ab44d4f548bfb3cadb1a0525b6
parentcb9902b99e411bad6c0c938f6826d39a32dc3829 (diff)
Fix warning with built-in types check if the type is from QtGui/Widgets6.9
Fixes: QTBUG-131016 Pick-to: 6.8 Change-Id: I2ffd9c9eb28f629b3977a5dcf271f5eb44495872 Reviewed-by: Brett Stottlemyer <brett.stottlemyer@gmail.com> (cherry picked from commit 1a523a418915d1512f515e165c88541539e92bff) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tools/repc/repcodegenerator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/repc/repcodegenerator.cpp b/tools/repc/repcodegenerator.cpp
index a542558..7715e37 100644
--- a/tools/repc/repcodegenerator.cpp
+++ b/tools/repc/repcodegenerator.cpp
@@ -107,10 +107,10 @@ static QList<ASTFunction> transformEnumParams(const ASTClass& classContext,
*/
static bool isBuiltinType(const QString &type)
{
- const auto metaType = QMetaType::fromName(type.toLatin1().constData());
- if (!metaType.isValid())
- return false;
- return (metaType.id() < QMetaType::User);
+#define CHECK_FOR_BUILT_IN_TYPE(TypeName, Id, Name) if (type == QStringLiteral(#Name)) return true;
+ QT_FOR_EACH_STATIC_TYPE(CHECK_FOR_BUILT_IN_TYPE)
+#undef CHECK_FOR_BUILT_IN_TYPE
+ return false;
}
RepCodeGenerator::RepCodeGenerator(QIODevice *outputDevice, const AST &ast)