qmljsfindexportedcpptypes: Minor optimization

Change-Id: Ie9c3a18fab6aa0ea0d054a118cb2864b15d240f2
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Kevin Funk
2020-12-03 22:50:34 +01:00
committed by Fawzi Mohamed
parent d42f38cc96
commit e2668f4bbf

View File

@@ -153,12 +153,12 @@ protected:
const Identifier *templateIdentifier = translationUnit()->identifier(templateId->identifier_token);
if (!templateIdentifier)
return false;
const QString callName = QString::fromUtf8(templateIdentifier->chars());
if (callName == QLatin1String("qmlRegisterType"))
const QByteArray callName(templateIdentifier->chars());
if (callName == "qmlRegisterType")
registrationFunction = QmlRegisterType4;
else if (callName == QLatin1String("qmlRegisterSingletonType"))
else if (callName == "qmlRegisterSingletonType")
registrationFunction = QmlRegisterSingletonTypeCallback1;
else if (callName == QLatin1String("qmlRegisterUncreatableType"))
else if (callName == "qmlRegisterUncreatableType")
registrationFunction = QmlRegisterUncreatableType;
else
return false;