QmlDesigner: Allow functions of animations

For some reason we get nullValue for the functions
of animations like 'update', 'start', 'restart', 'stop', 'pause'.

Change-Id: I2301083d6d61e2f8f59e5878023cac0fcf711e61
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
Thomas Hartmann
2021-05-07 16:55:24 +02:00
parent c5ab920589
commit 39ac7b1bf6

View File

@@ -237,6 +237,9 @@ void ActionEditor::prepareConnections()
QmlJS::ValueOwner *interp = context->valueOwner();
const QmlJS::Value *value = interp->convertToObject(scopeChain.evaluate(expression));
if (value->asNullValue() && !methodBlackList.contains(slotName))
connection.methods.append(QString::fromUtf8(slotName));
if (const QmlJS::FunctionValue *f = value->asFunctionValue()) {
// Only add slots with zero arguments
if (f->namedArgumentCount() == 0 && !methodBlackList.contains(slotName))