Skip to content

Ensure build-variant workflow patches C++ defaults to match QML settings - #4910

Merged
cagnulein merged 1 commit into
masterfrom
codex/fix-default-value-synchronization-for-settings
Aug 11, 2026
Merged

Ensure build-variant workflow patches C++ defaults to match QML settings#4910
cagnulein merged 1 commit into
masterfrom
codex/fix-default-value-synchronization-for-settings

Conversation

@cagnulein

Copy link
Copy Markdown
Owner

Motivation

  • The workflow previously changed only the QML src/settings.qml defaults for some build variants which caused a runtime mismatch with the C++ fallback QZSettings::default_* values and required users to save settings manually before the C++ code used the intended value.
  • This must be fixed for every artifact variant that deliberately overrides a persistent setting in the workflow (NordicTrack / FitPro matrices) so the displayed QML default and the C++ fallback are identical.
  • Keep the change minimal and targeted so only deliberate workflow overrides are synchronized and normal release behavior is unchanged.

Description

  • Replaced the simple sed QML-only replacement in .github/workflows/main.yml with a small Python snippet that patches both src/settings.qml (the property string ...) and src/qzsettings.cpp (the const QString QZSettings::default_...) to the same matrix.variant value for each variant.
  • Each replacement is precise (matches the exact declaration text) and includes strict checks that exactly one original occurrence exists and exactly one updated occurrence is present, causing the workflow to fail loudly if the source text changed or the patch cannot be applied.
  • The change is applied only in the existing build-matrix steps for the NordicTrack and FitPro artifact jobs so unrelated settings and normal release behavior are not modified.

Testing

  • Simulated the four distinct override replacements (nordictrack_2950_ip, tdf_10_ip, proform_elliptical_ip, proform_rower_ip) against temporary copies and verified both settings.qml and qzsettings.cpp contained the expected "localhost" variant default, and these simulations passed.
  • Parsed .github/workflows/main.yml as YAML and ran git diff --check which reported no problems; actionlint was not installed in the environment used for verification.
  • A commit was produced with the workflow change and the workflow will now fail during build-time if any expected declaration is not found or the replacement verification fails, preventing silent mismatches.

Codex Task

@cagnulein
cagnulein merged commit e547eff into master Aug 11, 2026
17 checks passed
@cagnulein
cagnulein deleted the codex/fix-default-value-synchronization-for-settings branch August 11, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant