QmlJS: Fix unused variable warning

By using it.

Amends commit 66dc5e9713.

Change-Id: I21bfb7a2d83987f095bfd02b0cc20931e0feb68b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Orgad Shaneh
2019-01-18 10:11:21 +02:00
committed by Orgad Shaneh
parent e96509d648
commit d1a0479c98

View File

@@ -1631,7 +1631,7 @@ bool Check::visit(CallExpression *ast)
// allow adding connections with the help of the qt quick designer ui
bool isDirectInConnectionsScope =
(!m_typeStack.isEmpty() && m_typeStack.last() == QLatin1String("Connections"));
if (!whiteListedFunction && !isMathFunction && !isDirectInConnectionsScope)
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"};