Repository navigation
frontend: Sort the Add Source existing sources by name - #605
Merged
Merged
Conversation
updateExistingSources() picked the sources of the selected type (or every non-scene source for Recently Added) with an inline std::copy_if. Move that into SourceSelectExistingList() in frontend/utility so it can be tested without the dialog. No change in behaviour. Refs obs-rust#604. Co-Authored-By: Claude Opus 5.5 <[email protected]>
test_source_select_list creates real libobs sources of two dummy input types out of alphabetical order and asks the Add Source helper for one type's list. It comes back in creation order; before 32.2 the dialog listed them by name. Guards: Recently Added keeps creation order, and removed sources are not listed. Refs obs-rust#604. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Add Source dialog that replaced the old list in 32.2 listed the existing sources of a type in creation order; the old dialog's QListWidget sorted them by name. Sort them by name again, ignoring case. The Recently Added list keeps creation order. Each name is read once and the sort is stable. Fixes obs-rust#604. Co-Authored-By: Warchamp7 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=e571d9b58d1c8cbd70c0b80d664fb52ed6d6844d secs=357 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run Ci-Attestation: {"at":1791913802,"gate":"rust/all/fmt","host":"linux-x86_64","key":"42b9e0c9843a9db7779aee9f5c5bf717deea5111cb979fdc1770de14161f784b","lane":"lint","parents":["dcdceedc1d4ec2283bd81763cd379900a401288a"],"secs":26,"stamp":"ee65feadb881268f9bfaffbe95a04a30","tree":"e571d9b58d1c8cbd70c0b80d664fb52ed6d6844d","v":1,"via":"run"} Ci-Attestation: {"at":1791913802,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"42b9e0c9843a9db7779aee9f5c5bf717deea5111cb979fdc1770de14161f784b","lane":"lint","parents":["dcdceedc1d4ec2283bd81763cd379900a401288a"],"secs":26,"stamp":"abc70ee54561a81ebedbd459e45e01fd","tree":"e571d9b58d1c8cbd70c0b80d664fb52ed6d6844d","v":1,"via":"run"} Ci-Attestation: {"at":1791913802,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"820a274a9d438586c565b6b58844012be5ca199dcfaff9c9ced4df74e9f00f5b","lane":"rust-test","parents":["dcdceedc1d4ec2283bd81763cd379900a401288a"],"secs":115,"stamp":"2a7e194af0cb4e49ae8a951058cb22bc","tree":"e571d9b58d1c8cbd70c0b80d664fb52ed6d6844d","v":1,"via":"run"} Ci-Attestation: {"at":1791913802,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"cde0a8459f6427971bbaa49015fd1b9a80443d24f4cf1ce9c4d012d85faf305c","lane":"cross","parents":["dcdceedc1d4ec2283bd81763cd379900a401288a"],"secs":92,"stamp":"4ad044929908f0fe1c90ae249c297770","tree":"e571d9b58d1c8cbd70c0b80d664fb52ed6d6844d","v":1,"via":"run"} Ci-Attestation: {"at":1791913802,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"cde0a8459f6427971bbaa49015fd1b9a80443d24f4cf1ce9c4d012d85faf305c","lane":"cross","parents":["dcdceedc1d4ec2283bd81763cd379900a401288a"],"secs":92,"stamp":"c95a5c77253ca7993228c57212273f72","tree":"e571d9b58d1c8cbd70c0b80d664fb52ed6d6844d","v":1,"via":"run"} Ci-Attestation: {"at":1791913802,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"cde0a8459f6427971bbaa49015fd1b9a80443d24f4cf1ce9c4d012d85faf305c","lane":"cross","parents":["dcdceedc1d4ec2283bd81763cd379900a401288a"],"secs":92,"stamp":"d1737b126ea0133cbbc648d74775c645","tree":"e571d9b58d1c8cbd70c0b80d664fb52ed6d6844d","v":1,"via":"run"} Ci-Attestation: {"at":1791913802,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"cde0a8459f6427971bbaa49015fd1b9a80443d24f4cf1ce9c4d012d85faf305c","lane":"cross","parents":["dcdceedc1d4ec2283bd81763cd379900a401288a"],"secs":92,"stamp":"62c41366ab4567a12c08b779f322137c","tree":"e571d9b58d1c8cbd70c0b80d664fb52ed6d6844d","v":1,"via":"run"} Ci-Attestation: {"at":1791913802,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"cde0a8459f6427971bbaa49015fd1b9a80443d24f4cf1ce9c4d012d85faf305c","lane":"cross","parents":["dcdceedc1d4ec2283bd81763cd379900a401288a"],"secs":92,"stamp":"bb220c873ef846dcbf1d7321f5e3ecb7","tree":"e571d9b58d1c8cbd70c0b80d664fb52ed6d6844d","v":1,"via":"run"} Ci-Attestation: {"at":1791913802,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"cde0a8459f6427971bbaa49015fd1b9a80443d24f4cf1ce9c4d012d85faf305c","lane":"cross","parents":["dcdceedc1d4ec2283bd81763cd379900a401288a"],"secs":92,"stamp":"85de2e5d16f9f8743d03b7f278d2d61a","tree":"e571d9b58d1c8cbd70c0b80d664fb52ed6d6844d","v":1,"via":"run"} Ci-Attestation: {"at":1791913802,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"be928132e7e7e4a43c1b61246b6c7faa063c83e8ab81d43fd6fc1451cf648d1a","lane":"tier2-linux","parents":["dcdceedc1d4ec2283bd81763cd379900a401288a"],"secs":124,"stamp":"261d59c3e5cb257e5412e5a74881c391","tree":"e571d9b58d1c8cbd70c0b80d664fb52ed6d6844d","v":1,"via":"run"}
Member
zackees
force-pushed
the
fix/source-select-sort
branch
from
October 13, 2026 17:50
9bf6405 to
cfce182
Compare
This was referenced Oct 13, 2026
zackees
added a commit
to rdoupe/obs-studio
that referenced
this pull request
Oct 13, 2026
cmocka.h defines inline for MSVC; the C++ standard library then stops with C1189 (xkeycheck.h). test_preview_audio_sources (obs-rust#603) and test_source_select_list (obs-rust#605) broke Rust Tier 2 on Windows. Local-Gate: v1 tree=18171423214d0ff1f389335b7ecfa6dfaa2a3325 secs=318 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run Ci-Attestation: {"at":1791915462,"gate":"rust/all/fmt","host":"linux-x86_64","key":"a170de36a11c01c60ef4be85fbbb63c87b7c8f6fd7540f779537e6263ee47bb2","lane":"lint","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":26,"stamp":"94fd94970e6fe618a97da21fa028bca2","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"a170de36a11c01c60ef4be85fbbb63c87b7c8f6fd7540f779537e6263ee47bb2","lane":"lint","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":26,"stamp":"47fb7dc0fd63778a6c47af595688bd9c","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"a68a6419710723aa179271d9832becca610d83d890c16b635148e37896b4dd00","lane":"rust-test","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":80,"stamp":"26c6b571267af1df9c5fe47a801103bc","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"8907a8740d6482a11a2d098769993caa1a477d63e36066a5cc4b8f7fa4cc8764","lane":"cross","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":62,"stamp":"53ab1315bef740a3ed55ca1e69334be8","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"8907a8740d6482a11a2d098769993caa1a477d63e36066a5cc4b8f7fa4cc8764","lane":"cross","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":62,"stamp":"8d311426e90d4964c931bcfae1e81ef3","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"8907a8740d6482a11a2d098769993caa1a477d63e36066a5cc4b8f7fa4cc8764","lane":"cross","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":62,"stamp":"43d4fb522d7319c971b6724597570f28","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"8907a8740d6482a11a2d098769993caa1a477d63e36066a5cc4b8f7fa4cc8764","lane":"cross","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":62,"stamp":"aa343661a87b3008281e5a37b561926d","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"8907a8740d6482a11a2d098769993caa1a477d63e36066a5cc4b8f7fa4cc8764","lane":"cross","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":62,"stamp":"7497935565e024dddba340a5d2aa00c3","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"8907a8740d6482a11a2d098769993caa1a477d63e36066a5cc4b8f7fa4cc8764","lane":"cross","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":62,"stamp":"1a99834f286813ad454cf854cce18dd4","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"3dd1f4a787d118314f3cbeeaf0de9dedcf34351f267585947d794ea676b66a6a","lane":"tier2-linux","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":150,"stamp":"d84556bb2dee1e55ea8cf6bcd8c5a2dc","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"}
This was referenced Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Add Source dialog lists the existing sources of a type by name again (ignoring case), as before 32.2. Since the new dialog in 32.2 they were listed in creation order. The Recently Added list keeps its order (newest first).
frontend: Move the Add Source existing-source filter into a helper: moves the filter inupdateExistingSources()intoSourceSelectExistingList()(frontend/utility/source-select-list.cpp, Qt Core only) so it can be tested without the dialog. No change in behaviour.test/cmocka: Add Source lists a type's existing sources unsorted:test_source_select_listcreates real libobs sources of two dummy input types out of alphabetical order (Zeta, alpha, Mike, beta, Charlie, mixed with another type) and asks the helper for one type's list. The cases are:1 of 3 fails today (the guards pass), the same way in every run: the list comes back as "Zeta, alpha, Mike, beta, Charlie".
frontend: Sort the Add Source existing sources by name: the fix, a port of Warchamp7's frontend: Sort add source list alphabetically obsproject/obs-studio#13952 (credited as co-author). Differences: each name is read once before sorting, and the sort is stable, so a source that disappears while the list is built cannot break the comparison. 3 of 3 pass.Motivation and Context
Fixes #604 (upstream obsproject/obs-studio#13947, reported by tiberium-v; labelled as a regression and confirmed upstream). Warchamp7 explains in #13952 that the old dialog's
QListWidgethad sorting enabled, which is why the list used to be alphabetical; that PR is not merged yet.Reproduced in the current release (AppImage 33.0.0-beta6-799), headless, with a small test module that adds five Color Sources named Zeta, alpha, Mike, beta, Charlie, opens Add Source and reads the buttons: Color Source lists "Zeta, alpha, Mike, beta, Charlie".
Why this one: a confirmed regression in a dialog everyone uses, reported by a user; small fix with an upstream author's design; reproduced in our release.
How Has This Been Tested?
Automated, in both libobs lanes (
ENABLE_RUST_LIBOBSOFF and ON), rebased on current master:test_source_select_list: 1 of 3 cases fails at the RED commit and 3 of 3 pass at GREEN (3 runs each per lane), under a private Xvfb.ctest -Vshows all 3 cases run. Liketest_filter_clipboard, it needs a display forobs_startup()and its cases skip without one (so they skip in CI, which has no display).open_crashes_without_obs_coreskips).End to end with the fix (OBS built from this branch with the frontend, Rust libobs, headless, same test module): Color Source lists "alpha, beta, Charlie, Mike, Zeta"; Recently Added is unchanged ("Charlie, beta, Mike, alpha, Zeta", newest first).
Types of changes
Checklist:
🤖 Generated with Claude Code