qmljs: do not warn for QT_TR* functions

Change-Id: If5cf78434458ae639b4ebd0cb156110b5a291613
Task-number: QTCREATORBUG-12494
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Fawzi Mohamed
2014-11-05 19:12:08 +01:00
committed by Fawzi Mohamed
parent ab4edad6ba
commit 6fed775226

View File

@@ -1557,7 +1557,10 @@ bool Check::visit(CallExpression *ast)
&& name != QLatin1String("Boolean")
&& name != QLatin1String("Date")
&& name != QLatin1String("Number")
&& name != QLatin1String("Object")) {
&& name != QLatin1String("Object")
&& name != QLatin1String("QT_TR_NOOP")
&& name != QLatin1String("QT_TRANSLATE_NOOP")
&& name != QLatin1String("QT_TRID_NOOP")) {
addMessage(WarnExpectedNewWithUppercaseFunction, location);
}
if (cast<IdentifierExpression *>(ast->base) && name == QLatin1String("eval"))