From e214868d816128ed29fefa34d0590311f3b65788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Thu, 9 Jan 2025 19:05:48 +0100 Subject: [PATCH 1/2] [ui] Fix injections into signal handlers with JS functions --- meshroom/ui/qml/Application.qml | 2 +- meshroom/ui/qml/GraphEditor/GraphEditor.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/ui/qml/Application.qml b/meshroom/ui/qml/Application.qml index e96677d7..4b554bab 100644 --- a/meshroom/ui/qml/Application.qml +++ b/meshroom/ui/qml/Application.qml @@ -1281,7 +1281,7 @@ Page { _reconstruction.forceNodesStatusUpdate(); computeManager.submit(nodes) } - onFilesDropped: { + onFilesDropped: function(drop, mousePosition) { var filesByType = _reconstruction.getFilesByTypeFromDrop(drop.urls) if (filesByType["meshroomScenes"].length == 1) { ensureSaved(function() { diff --git a/meshroom/ui/qml/GraphEditor/GraphEditor.qml b/meshroom/ui/qml/GraphEditor/GraphEditor.qml index b9191634..36a78a36 100755 --- a/meshroom/ui/qml/GraphEditor/GraphEditor.qml +++ b/meshroom/ui/qml/GraphEditor/GraphEditor.qml @@ -987,7 +987,7 @@ Item { id: dropArea anchors.fill: parent keys: ["text/uri-list"] - onEntered: { + onEntered: function(drag) { nbMeshroomScenes = 0 nbDraggedFiles = drag.urls.length From bfb9ee3272fb0bf03cf361b1787d84a66ebbc1c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Thu, 9 Jan 2025 19:19:20 +0100 Subject: [PATCH 2/2] [GraphEditor] Convert file to string before testing its extension This fixes the "Property 'endsWith' of object file xxx is not a function" warning. --- meshroom/ui/qml/GraphEditor/GraphEditor.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/ui/qml/GraphEditor/GraphEditor.qml b/meshroom/ui/qml/GraphEditor/GraphEditor.qml index 36a78a36..6feb3d6e 100755 --- a/meshroom/ui/qml/GraphEditor/GraphEditor.qml +++ b/meshroom/ui/qml/GraphEditor/GraphEditor.qml @@ -992,7 +992,7 @@ Item { nbDraggedFiles = drag.urls.length drag.urls.forEach(function(file) { - if (file.endsWith(".mg")) { + if (String(file).endsWith(".mg")) { nbMeshroomScenes++ } })