forked from qt-creator/qt-creator
QmlJS: Add "Array" to global functions
This fixes a false positive error message. Task-number: QTCREATORBUG-22599 Change-Id: I54104857982873baaa092ad936586c3d245ce720 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -1676,7 +1676,7 @@ bool Check::visit(CallExpression *ast)
|
||||
if (!whiteListedFunction && !isMathFunction && !isDateFunction && !isDirectInConnectionsScope)
|
||||
addMessage(ErrFunctionsNotSupportedInQmlUi, location);
|
||||
|
||||
static const QStringList globalFunctions = {"String", "Boolean", "Date", "Number", "Object", "QT_TR_NOOP", "QT_TRANSLATE_NOOP", "QT_TRID_NOOP"};
|
||||
static const QStringList globalFunctions = {"String", "Boolean", "Date", "Number", "Object", "Array", "QT_TR_NOOP", "QT_TRANSLATE_NOOP", "QT_TRID_NOOP"};
|
||||
|
||||
if (!name.isEmpty() && name.at(0).isUpper() && !globalFunctions.contains(name)) {
|
||||
addMessage(WarnExpectedNewWithUppercaseFunction, location);
|
||||
|
Reference in New Issue
Block a user