Return extension from file dialog and use it on file save - #199
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe QML file dialog resets the selected name-filter index before opening. It adds an 🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@framework/interactive/qml/Muse/Interactive/FileDialog.qml`:
- Around line 51-58: Update the extension lookup in the return construction to
index root.selectedNameFilter.extensions from zero, using the first extension
(or the contractually required representation of all alternatives) instead of
selectedNameFilter.index. Preserve the existing empty-string fallback and path
handling.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 1db4a5a0-f431-4f69-8689-f60bb48fc5f6
📒 Files selected for processing (2)
framework/interactive/internal/interactive.cppframework/interactive/qml/Muse/Interactive/FileDialog.qml
cdef143 to
373fa1b
Compare
373fa1b to
d8bdcad
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@framework/interactive/qml/Muse/Interactive/FileDialog.qml`:
- Around line 42-50: Update appendSuffixIfNeeded to check filePath against every
entry in root.selectedNameFilter.extensions, returning it unchanged when it
already ends with any valid suffix; only append the first non-special extension
when no listed suffix matches, while preserving the existing empty and all-files
behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 3333aff1-cdc8-43ab-bd3b-acca41df6164
📒 Files selected for processing (1)
framework/interactive/qml/Muse/Interactive/FileDialog.qml
6d70b1d to
eb6dddd
Compare
eb6dddd to
b821d67
Compare
Resolves: audacity/audacity#8166
Linux file picker on save does not add the selected extension to the filename.
This PR returns the extension from the dialog and append it to the filename.
Build configuration
audacity: audacity/audacity/master
audacity platforms: linux_x64
musescore: musescore/MuseScore/main
musescore platforms: linux_x64