forked from qt-creator/qt-creator
QmlJS:: Allow qsTr() for .ui.qml files
Change-Id: I8ccae13653bbb010853d99be9136bf364b823c3d Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
@@ -1541,7 +1541,10 @@ bool Check::visit(CallExpression *ast)
|
|||||||
SourceLocation location;
|
SourceLocation location;
|
||||||
const QString name = functionName(ast->base, &location);
|
const QString name = functionName(ast->base, &location);
|
||||||
|
|
||||||
|
//We have to allow the qsTr function for translation.
|
||||||
|
if (name != QLatin1String("qsTr"))
|
||||||
addMessage(ErrFunctionsNotSupportedInQmlUi, location);
|
addMessage(ErrFunctionsNotSupportedInQmlUi, location);
|
||||||
|
|
||||||
if (!name.isEmpty() && name.at(0).isUpper()
|
if (!name.isEmpty() && name.at(0).isUpper()
|
||||||
&& name != QLatin1String("String")
|
&& name != QLatin1String("String")
|
||||||
&& name != QLatin1String("Boolean")
|
&& name != QLatin1String("Boolean")
|
||||||
|
|||||||
Reference in New Issue
Block a user