From 39ac7b1bf6add473026687003311b702742b6b21 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 7 May 2021 16:55:24 +0200 Subject: QmlDesigner: Allow functions of animations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/plugins/qmldesigner/components/bindingeditor/actioneditor.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/qmldesigner/components/bindingeditor/actioneditor.cpp b/src/plugins/qmldesigner/components/bindingeditor/actioneditor.cpp index 89364c5116..672bd08033 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/actioneditor.cpp +++ b/src/plugins/qmldesigner/components/bindingeditor/actioneditor.cpp @@ -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)) -- cgit v1.2.1