forked from qt-creator/qt-creator
QmlDesigner: Allow qsTranslate in .ui.qml files
Also adding the NoOp functions. They can be used in models. Task-number: QTCREATORBUG-17714 Change-Id: Ide9745613850580f0098d2fa7f8889809d18bd45 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -1625,11 +1625,14 @@ bool Check::visit(CallExpression *ast)
|
||||
|
||||
const QString namespaceName = functionNamespace(ast->base);
|
||||
|
||||
// We have to allow the qsTr function for translation.
|
||||
// We have to allow the translation functions
|
||||
|
||||
const QStringList translationFunctions = { "qsTr", "qsTrId", "qsTranslate",
|
||||
"qsTrNoOp", "qsTrIdNoOp", "qsTranslateNoOp" };
|
||||
|
||||
const bool isTranslationFunction = translationFunctions.contains(name);
|
||||
|
||||
const bool isTranslationFunction = (name == QLatin1String("qsTr") || name == QLatin1String("qsTrId"));
|
||||
// We allow the Math. functions
|
||||
|
||||
const bool isMathFunction = namespaceName == "Math";
|
||||
// allow adding connections with the help of the qt quick designer ui
|
||||
bool isDirectInConnectionsScope =
|
||||
|
Reference in New Issue
Block a user