Repository navigation
Add an "Other…" custom sample rate option to the export dialog - #11375
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 5ec0856db3db1a32fe3860a8fb4457544533cd4b and 2edd546. 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughExportPreferencesModel now supports a custom "Other…" sample-rate path. It adds label helpers, includes an "Other…" entry when codecs accept any rate, opens a custom-rate dialog on selection, applies resolved custom rates to the export configuration, and preserves an existing positive custom rate in the any-rate case. The QML custom-rate dialog no longer declares a title property. Estimated code review effort: 2 (Simple) | ~12 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant ExportPreferencesModel
participant CustomRateDialog
User->>ExportPreferencesModel: select "Other…"
ExportPreferencesModel->>CustomRateDialog: open audacity://trackedit/custom_rate
CustomRateDialog-->>ExportPreferencesModel: resolve or reject
ExportPreferencesModel->>ExportPreferencesModel: update export configuration when resolved
ExportPreferencesModel->>ExportPreferencesModel: emit exportSampleRateListChanged and exportSampleRateChanged
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Warning Review ran into problems🔥 ProblemsLinked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped 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 |
| void ExportPreferencesModel::openCustomSampleRateDialog() | ||
| { | ||
| muse::UriQuery customRateUri("audacity://trackedit/custom_rate"); | ||
| customRateUri.addParam("title", muse::Val(muse::trc("export", "Set sample rate"))); |
There was a problem hiding this comment.
Can you remove the title property from the QML component? Because this title is not being set there.
There was a problem hiding this comment.
Good catch, fixed
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/importexport/export/view/exportpreferencesmodel.cpp (1)
397-406: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCustom-rate entry is appended out of numeric order.
The custom-rate entry is always appended right before "Other…", regardless of its numeric value relative to the preceding default rates. If the custom rate is smaller than some entries already in the list (e.g. 12000 after 96000), the dropdown will show it out of ascending order.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: ecdd4ebf-6494-4679-9fc6-6195713ba9bf
📥 Commits
Reviewing files that changed from the base of the PR and between f4a99b5a286ca024ce7a4acfe8fbc414f71551ce and 5ec0856db3db1a32fe3860a8fb4457544533cd4b.
📒 Files selected for processing (3)
src/importexport/export/view/exportpreferencesmodel.cppsrc/importexport/export/view/exportpreferencesmodel.hsrc/trackedit/qml/Audacity/TrackEdit/CustomRateDialog.qml
💤 Files with no reviewable changes (1)
- src/trackedit/qml/Audacity/TrackEdit/CustomRateDialog.qml
🚧 Files skipped from review as they are similar to previous changes (1)
- src/importexport/export/view/exportpreferencesmodel.h
Resolves: #9062
Recommended:
QA: