Skip to content

Return the selected files from the Linux open-files dialog - #365

Merged
igorkorsukov merged 1 commit into
musescore:mainfrom
jonata:fix-linux-import-file-dialog
Oct 19, 2026
Merged

igorkorsukov merged 1 commit into
musescore:mainfrom
jonata:fix-linux-import-file-dialog

Conversation

@jonata

@jonata jonata commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Resolves: audacity/audacity#12511

On Linux, Interactive::selectOpeningFilesSync opens the QML FileDialog, whose OpenFiles branch read root.fileUrls. Qt.labs.platform's FileDialog has no such property (the accepted files are in root.files), so the dialog always returned an empty list and File > Import did nothing.

This reads root.files and passes the URLs as strings, as the single-file branch does.

This is the QML part of @saintmatthieu's draft #243, which also had the C++ change that has since landed separately. Credit to him for the fix; this PR only carries the remaining piece.

Tested on Linux: importing one file and two files at once both add the expected tracks; before the change nothing was imported.

  • I signed the CLA.
  • The title of the PR describes the problem it addresses.
  • Each commit's message describes its purpose and effects, and references the issue it resolves. If changes are extensive, there is a sequence of easily reviewable commits.
  • The code in the PR follows the coding rules.
  • The code compiles and runs on my machine, preferably after each commit individually. I have manually tested and verified that my changes fulfil their intended purpose.
  • No prior attempts to resolve this problem exist, or if they do, I listed them in my PR description and described how I avoided repeating past mistakes.
  • There are no unnecessary changes.

Complete only if applicable:

  • I created a unit test or vtest to verify the changes I made.
  • This PR was created using AI assistance; I have read, understood and complied following the guidelines for AI-assisted contributions. The AI tool(s) I used are listed below.

Claude Code 2.1.281 (Claude Opus 5.5)

Build configuration

audacity: audacity/audacity/master
audacity platforms: linux_x64
musescore: musescore/MuseScore/main
musescore platforms: linux_x64

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: audacity/audacity#12511

Assisted-by: Claude Code 2.1.281 (Claude Opus 5.5)
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: musescore/muse_framework/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 3cc27031-1ced-42e7-9059-6bf57e004d72
📥 Commits

Reviewing files that changed from the base of the PR and between 42b0224 and a2005b3.

📒 Files selected for processing: 1
  • framework/interactive/qml/Muse/Interactive/FileDialog.qml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

When fileMode is OpenFiles, the dialog now returns string conversions of entries in root.files. Previously, it returned root.fileUrls, or an empty array when that value was unset.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to a2005

Linux File > Import now passes selected files through to the caller as URL strings that are converted to local paths. No material merge-blocking risk is evident.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the main change: returning selected files from the Linux open-files dialog.
Description check Passed The description explains the Linux defect, the root cause, the fix, testing results, issue link, prior attempt context, checklist status, and build configuration. It satisfies the repository template.…
Linked Issues check Passed Issue #12511 requires Linux File > Import to return and import the selected audio file. In framework/interactive/qml/Muse/Interactive/FileDialog.qml, the OpenFiles branch now iterates over `root.f…
Out of Scope Changes check Passed The pull request changes only the OpenFiles acceptance path in FileDialog.qml. Each changed line supports issue #12511 by returning selected file URLs to the caller. No unrelated implementation or…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Description check

Explanation

The description explains the Linux defect, the root cause, the fix, testing results, issue link, prior attempt context, checklist status, and build configuration. It satisfies the repository template. The unit-test checkbox is correctly left unchecked because the author did not add a unit test or vtest.

Full details: Linked Issues check

Explanation

Issue #12511 requires Linux File > Import to return and import the selected audio file. In framework/interactive/qml/Muse/Interactive/FileDialog.qml, the OpenFiles branch now iterates over root.files, converts each URL to a string, and returns the array. This replaces the invalid root.fileUrls access. The change supports one or more selected files and matches the stated Linux behavior.

Full details: Out of Scope Changes check

Explanation

The pull request changes only the OpenFiles acceptance path in FileDialog.qml. Each changed line supports issue #12511 by returning selected file URLs to the caller. No unrelated implementation or scope expansion is shown.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@igorkorsukov

Copy link
Copy Markdown
Member

/build

@github-actions

Copy link
Copy Markdown

@igorkorsukov
igorkorsukov merged commit bf454d2 into musescore:main Oct 19, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux: File / Import doesn't do anything

2 participants