[qt6] Use JS functions format to declare explicit parameters in slots

This fixes all the "Injection of parameters into signal handlers
is deprecated. Use JavaScript functions with formal parameters instead."
warnings.
This commit is contained in:
Candice Bentéjac 2024-10-01 13:14:18 +02:00
parent 1b9e75cd4f
commit 6d845376eb
12 changed files with 94 additions and 77 deletions

View file

@ -80,8 +80,8 @@ Item {
cameraInit: reconstruction ? reconstruction.cameraInit : null
tempCameraInit: reconstruction ? reconstruction.tempCameraInit : null
cameraInitIndex: reconstruction ? reconstruction.cameraInitIndex : -1
onRemoveImageRequest: reconstruction.removeImage(attribute)
onAllViewpointsCleared: { reconstruction.selectedViewId = "-1" }
onRemoveImageRequest: function(attribute) { reconstruction.removeImage(attribute) }
onAllViewpointsCleared: reconstruction.selectedViewId = "-1"
onFilesDropped: {
if (drop["meshroomScenes"].length == 1) {
ensureSaved(function() {
@ -226,8 +226,10 @@ Item {
DropArea {
anchors.fill: parent
keys: ["text/uri-list"]
onDropped: {
drop.urls.forEach(function(url){ load3DMedia(url); });
onDropped: function(drop) {
drop.urls.forEach(function(url) {
load3DMedia(url)
})
}
}