From cb301b2aaa12afc24277668f698b90db3c05c314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Thu, 26 Dec 2024 15:44:11 +0100 Subject: [PATCH] [GraphEditor] Fix injections into signal handlers with JS functions --- meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml | 2 +- meshroom/ui/qml/GraphEditor/NodeEditor.qml | 4 ++-- meshroom/ui/qml/GraphEditor/ScriptEditor.qml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml b/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml index f433a3042a..7914dd86c5 100644 --- a/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml +++ b/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml @@ -103,7 +103,7 @@ RowLayout { anchors.fill: parent hoverEnabled: true acceptedButtons: Qt.AllButtons - onDoubleClicked: root.doubleClicked(mouse, root.attribute) + onDoubleClicked: function(mouse) { root.doubleClicked(mouse, root.attribute) } property Component menuComp: Menu { id: paramMenu diff --git a/meshroom/ui/qml/GraphEditor/NodeEditor.qml b/meshroom/ui/qml/GraphEditor/NodeEditor.qml index a97400ab7a..b895c8291e 100644 --- a/meshroom/ui/qml/GraphEditor/NodeEditor.qml +++ b/meshroom/ui/qml/GraphEditor/NodeEditor.qml @@ -290,7 +290,7 @@ Panel { Layout.fillWidth: true model: root.node.attributes readOnly: root.readOnly || root.isCompatibilityNode - onAttributeDoubleClicked: root.attributeDoubleClicked(mouse, attribute) + onAttributeDoubleClicked: function(mouse, attribute) { root.attributeDoubleClicked(mouse, attribute) } onUpgradeRequest: root.upgradeRequest() filterText: searchBar.text } @@ -357,7 +357,7 @@ Panel { Layout.fillWidth: true model: root.node.internalAttributes readOnly: root.readOnly || root.isCompatibilityNode - onAttributeDoubleClicked: root.attributeDoubleClicked(mouse, attribute) + onAttributeDoubleClicked: function(mouse, attribute) { root.attributeDoubleClicked(mouse, attribute) } onUpgradeRequest: root.upgradeRequest() filterText: searchBar.text } diff --git a/meshroom/ui/qml/GraphEditor/ScriptEditor.qml b/meshroom/ui/qml/GraphEditor/ScriptEditor.qml index 91de7bd18b..933299e92f 100644 --- a/meshroom/ui/qml/GraphEditor/ScriptEditor.qml +++ b/meshroom/ui/qml/GraphEditor/ScriptEditor.qml @@ -118,7 +118,7 @@ Item { ToolTip.text: "Execute Script" onClicked: { - processScript() + root.processScript() } } @@ -285,9 +285,9 @@ Item { root.forceActiveFocus() } - Keys.onPressed: { + Keys.onPressed: function(event) { if ((event.key === Qt.Key_Enter || event.key === Qt.Key_Return) && event.modifiers === Qt.ControlModifier) { - processScript() + root.processScript() } } }