Skip to content

Replace the USE_QT_UI global with use_qt_ui() - #1843

Merged
Mysticial merged 1 commit into
PokemonAutomation:mainfrom
dayfine:up/use-qt-ui-accessor
Nov 4, 2026
Merged

Mysticial merged 1 commit into
PokemonAutomation:mainfrom
dayfine:up/use-qt-ui-accessor

Conversation

@dayfine

@dayfine dayfine commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

USE_QT_UI was a mutable global that each executable defined (true in SerialPrograms, false in SerialProgramsCommandLine) and the serial connection code read. This makes it a function, use_qt_ui(), that each executable defines next to its main(), so the value is still picked at link time but nothing can change it at run time. No behavior change; it prepares a headless unit test runner, which defines it as false. Tested by compiling the library and both executables on macOS.

USE_QT_UI was a mutable global that each executable defined (true in
SerialPrograms, false in SerialProgramsCommandLine) and the serial
connection code read. Make it a function each executable defines next to
its main(), so the value is still chosen at link time but nothing can
change it at run time. No behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@Mysticial
Mysticial merged commit 3000f47 into PokemonAutomation:main Nov 4, 2026
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants