QmlJSCheck: Add missing comma

Change-Id: I5f26cbe50ecb47c088bab8b9cdea49d0103352eb
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2023-01-20 11:10:22 +01:00
parent 0174e3495f
commit 49955964f7

View File

@@ -1838,10 +1838,23 @@ bool Check::visit(CallExpression *ast)
static const QStringList colorFunctions = {"lighter", "darker", "rgba", "tint", "hsla", "hsva"}; static const QStringList colorFunctions = {"lighter", "darker", "rgba", "tint", "hsla", "hsva"};
static const QStringList qtFunction = {"point", "rect", "size", "vector2d", "vector3d", "vector4d", "quaternion" "matrix4x4", "formatDate", static const QStringList qtFunction = {"point",
"formatDateTime", "formatTime", "resolvedUrl"}; "rect",
"size",
"vector2d",
"vector3d",
"vector4d",
"quaternion",
"matrix4x4",
"formatDate",
"formatDateTime",
"formatTime",
"resolvedUrl"};
const bool whiteListedFunction = translationFunctions.contains(name)
|| whiteListedFunctions.contains(name)
|| colorFunctions.contains(name) || qtFunction.contains(name);
const bool whiteListedFunction = translationFunctions.contains(name) || whiteListedFunctions.contains(name) || colorFunctions.contains(name) || qtFunction.contains(name);
// We allow the Math. functions // We allow the Math. functions
const bool isMathFunction = namespaceName == "Math"; const bool isMathFunction = namespaceName == "Math";