fix(gui): guard TMate2Overlay calls in applyFlexControlWheelAction with HAVE_HIDAPI#3436
Conversation
|
Hi @NF0T — thanks for this. The failing check is Qt Accessibility Static Analysis, but it's a CI infrastructure bug in What's actually failingThe workflow's "Run accessibility check" step fails on PRs that touch COUNT=$(grep -c "^::warning" /tmp/a11y_output.txt || echo "0")When …to I reproduced this locally against your branch's The script itself ( Why your PR is the triggerThe a11y workflow was added in #3289 and is fairly new. Most PRs don't touch What to doNothing on your end. Per the workflow's own comments and the check_a11y.py docstring, this check is "warnings only — the build is not blocked" — it's not a merge gate. A maintainer can either:
The actual change in this PR (gating 🤖 aethersdr-agent · cost: $15.9898 · model: claude-opus-4-7 |
|
Thanks for catching and fixing this so fast, @NF0T — this one's on me. I added those five Your guard placement is exactly right and matches the #3344 UlanziDial pattern; runtime behaviour on HIDAPI builds is unchanged. Reviewed the diff — LGTM. Sorry for the cleanup, and thanks again. 73, Jan (svabi79) |
6086d46 to
5b12c78
Compare
…th HAVE_HIDAPI. Principle IX. applyFlexControlWheelAction is declared outside any HAVE_HIDAPI block but five call sites inside it reference triggerTMate2Overlay(TMate2Overlay::...) which is only declared when HAVE_HIDAPI is defined. Breaks the build on MinGW/no-hidapi (Windows without the HID setup script). Wraps each of the five sites with #ifdef HAVE_HIDAPI / #endif, matching the pattern from PR aethersdr#3344. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5b12c78 to
f232c3c
Compare
|
Rebased onto current main as `f232c3cb` to pick up #3442's a11y workflow fix. Your code didn't trigger any a11y findings — same workflow-yaml bug that hit your #3439: the pre-#3442 step crashed writing the zero-findings result to `$GITHUB_OUTPUT`, even though the lint itself completed cleanly. Timing: CI ran 2026-06-06 19:31 UTC, #3442 merged 21:44 UTC. No content changes to your fix — the `HAVE_HIDAPI` guards around the `TMate2Overlay` calls in `applyFlexControlWheelAction` are exactly as you wrote them. CI will re-run against `f232c3cb` and the a11y check will pass cleanly this time. Principle XI. |
Summary
Fixes #3435.
applyFlexControlWheelActionis declared outside any#ifdef HAVE_HIDAPIblock(it handles wheel inputs from FlexControl, MIDI, and other non-HID sources), but
PR #3401 added five call sites inside it that reference
triggerTMate2Overlay(TMate2Overlay::...).Both the
TMate2Overlayenum class andtriggerTMate2Overlayare declared insidethe
#ifdef HAVE_HIDAPIblock inMainWindow.h(lines 573–623), so they areinvisible to the compiler on configurations without HIDAPI — specifically the
MinGW / no-
setup-hidapi.ps1Windows developer build.Affected actions:
WheelRit,WheelVolume,WheelHeadphoneVolume,WheelPower,WheelCwSpeed— all five call sites are wrapped with#ifdef HAVE_HIDAPI/#endif. Runtime behavior on HIDAPI-enabled buildsis unchanged.
This is the same guard pattern applied in PR #3344 to
UlanziDial.Constitution principle honored
Principle IX — Surface Only What Survives. Code on
mainmust compile onall target platforms. The no-HIDAPI MinGW path is a required target
(Windows developer builds before running
setup-hidapi.ps1); surfaces thatbreak that build do not survive the platform gate.
Test plan
HAVE_HIDAPIpasses — MinGW GCC 13.1.0 / Qt 6.11.0 / no hidapi, verified locallyHAVE_HIDAPIunaffected — same toolchain, guards compile out cleanlyChecklist
docs/COMMIT-SIGNING.md)AppSettingscalls — N/AMeterSmoother— N/A