From a2005b3edd14a9b7f85c3eae7c66f6dba886eb01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonat=C3=A3=20Bolzan=20Loss?= Date: Fri, 16 Oct 2026 12:27:21 -0300 Subject: [PATCH] Return the selected files from the Linux open-files dialog Interactive::selectOpeningFilesSync uses the QML FileDialog on Linux, which read root.fileUrls in OpenFiles mode. Qt.labs.platform's FileDialog has no such property; the accepted files are in root.files. The dialog always returned an empty list, so File > Import did nothing on Linux. Read root.files and pass the URLs as strings, as the single-file branch does. Resolves: https://github.com/audacity/audacity/issues/12511 Assisted-by: Claude Code 2.1.281 (Claude Opus 5.5) --- framework/interactive/qml/Muse/Interactive/FileDialog.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/framework/interactive/qml/Muse/Interactive/FileDialog.qml b/framework/interactive/qml/Muse/Interactive/FileDialog.qml index d3aadd5627..3323edcd4d 100644 --- a/framework/interactive/qml/Muse/Interactive/FileDialog.qml +++ b/framework/interactive/qml/Muse/Interactive/FileDialog.qml @@ -65,8 +65,11 @@ QtPlatform.FileDialog { onAccepted: { if (root.fileMode === FileDialog.OpenFiles) { - const selectedUrls = root.fileUrls || [] - root.ret = { "errcode": 0, "value": selectedUrls } + const selectedFiles = [] + for (let i = 0; i < root.files.length; ++i) { + selectedFiles.push(root.files[i].toString()) + } + root.ret = { "errcode": 0, "value": selectedFiles } } else if (root.fileMode === FileDialog.SaveFile) { root.ret = { "errcode": 0, "value": root.appendSuffixIfNeeded(root.currentFile.toString()) } } else {