forked from qt-creator/qt-creator
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:
@@ -237,6 +237,9 @@ void ActionEditor::prepareConnections()
|
|||||||
QmlJS::ValueOwner *interp = context->valueOwner();
|
QmlJS::ValueOwner *interp = context->valueOwner();
|
||||||
const QmlJS::Value *value = interp->convertToObject(scopeChain.evaluate(expression));
|
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()) {
|
if (const QmlJS::FunctionValue *f = value->asFunctionValue()) {
|
||||||
// Only add slots with zero arguments
|
// Only add slots with zero arguments
|
||||||
if (f->namedArgumentCount() == 0 && !methodBlackList.contains(slotName))
|
if (f->namedArgumentCount() == 0 && !methodBlackList.contains(slotName))
|
||||||
|
Reference in New Issue
Block a user