Fix build with the disabled 'translation' feature

Definition of QMetaObject::metaType() should be outside the
QT_NO_TRANSLATION guard.

Fixes: QTBUG-104959
Pick-to: 6.2 6.3 6.4
Change-Id: Icb1bf6e9cbad8b4c70ca09b5e7eafd125d866557
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Alexey Edelev 2022-07-14 17:23:15 +02:00
parent 7d2361b9da
commit 4f56b7d841

View File

@ -357,6 +357,7 @@ QString QMetaObject::tr(const char *s, const char *c, int n) const
{
return QCoreApplication::translate(objectClassName(this), s, c, n);
}
#endif // QT_NO_TRANSLATION
/*!
\since 6.2
@ -384,7 +385,6 @@ QMetaType QMetaObject::metaType() const
return QMetaType::fromName(className()); // try lookup by name in that case
}
}
#endif // QT_NO_TRANSLATION
/*!
Returns the method offset for this class; i.e. the index position