You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That PR introduced a second copy of ~50 lines of DAX IQ stream-status / connect() wiring in MainWindow() (outside the audio-bridge gate, for Windows / non-PipeWire Linux), mirroring the original block inside MainWindow::startDax() (MainWindow.cpp:13231–13281).
The duplication was the minimum-risk fix for the immediate bug (#2524 was a "fix things, don't refactor" change), but as the reviewer noted, it carries a real drift risk:
Any future change to the IQ-side wiring (an extra connect, a log line, a refactor of streamStatusBelongsToUs, etc.) now has to be applied in both places, and a desync would re-create exactly this class of bug — silent on one platform, working on another.
Proposed change
Extract a private member function on MainWindow:
private:// Wire the DAX IQ status-handler / VITA-49 routing / applet enable-disable// signals. Independent of the audio bridge — safe to call on every// platform, but typically called once from each branch of the// platform-specific DAX startup paths.voidwireDaxIqRouting();
Called from:
The new ctor-time block on !Q_OS_MAC && !HAVE_PIPEWIRE platforms (where the audio bridge isn't available)
Inside startDax() on Q_OS_MAC || HAVE_PIPEWIRE platforms (replacing the inline copy)
Both call sites would shrink to one line, the duplication collapses, and any future tweak to the wiring lands in one place.
The compile-time gating around who calls the helper stays as-is — the helper itself is platform-agnostic, but on Mac/PipeWire it's still called lazily on DAX-audio-toggle (existing startDax() semantics) rather than at construction. Preserving that lazy behaviour on those platforms is intentional.
Risk
Low. Pure code motion — same connect() calls, same lambda bodies, same gating decisions. Easy to verify by running the same three-platform build matrix that #2524 used.
Follow-up to #2524.
That PR introduced a second copy of ~50 lines of DAX IQ stream-status /
connect()wiring inMainWindow()(outside the audio-bridge gate, for Windows / non-PipeWire Linux), mirroring the original block insideMainWindow::startDax()(MainWindow.cpp:13231–13281).The duplication was the minimum-risk fix for the immediate bug (#2524 was a "fix things, don't refactor" change), but as the reviewer noted, it carries a real drift risk:
Proposed change
Extract a private member function on
MainWindow:Called from:
!Q_OS_MAC && !HAVE_PIPEWIREplatforms (where the audio bridge isn't available)startDax()onQ_OS_MAC || HAVE_PIPEWIREplatforms (replacing the inline copy)Both call sites would shrink to one line, the duplication collapses, and any future tweak to the wiring lands in one place.
Out of scope
startDax()semantics) rather than at construction. Preserving that lazy behaviour on those platforms is intentional.Risk
Low. Pure code motion — same
connect()calls, same lambda bodies, same gating decisions. Easy to verify by running the same three-platform build matrix that #2524 used.73, Nigel G0JKN & Claude (AI dev partner)