Skip to content

Fix floating window metric settings not persisting - #4872

Merged
cagnulein merged 1 commit into
masterfrom
claude/qz-ai-app-issues-gmail-ld44zu
Aug 1, 2026
Merged

Fix floating window metric settings not persisting#4872
cagnulein merged 1 commit into
masterfrom
claude/qz-ai-app-issues-gmail-ld44zu

Conversation

@cagnulein

Copy link
Copy Markdown
Owner

Summary

  • A user (Kareem, via email "QZ AI App Issues") reported that the metric selections in the floating/horizontal companion window don't persist after closing and reopening the app.
  • Root cause: TemplateInfoSenderBuilder::onSetSettings (src/templateinfosenderbuilder.cpp) only wrote an incoming setting to QSettings when its QVariant type exactly matched the type already stored. QSettings backends (INI on desktop, native storage on Android) don't reliably round-trip bool, so a previously-saved value can come back as QString/int. When that happened, the type check failed and the new value was silently discarded, with the old value echoed back as if nothing changed.
  • Fix: coerce the incoming value to the stored type (QVariant::convert) instead of dropping it when types differ but are convertible, then always persist.

Test plan

  • Manual: toggle a metric checkbox in the floating window, close and relaunch the main app, verify the selection is retained.
  • Existing behavior for keys not previously present in settings (first-time save) is unchanged.

Generated by Claude Code

onSetSettings() only applied an incoming value when its QVariant type
exactly matched the type already stored in QSettings. QSettings
backends (e.g. Android/INI) don't reliably round-trip bool, so a
stored setting could come back as QString/int, causing the type
check to fail and the new value to be silently discarded and echoed
back unchanged. Coerce the incoming value to the stored type instead
of dropping it.
@cagnulein
cagnulein merged commit 99f27b2 into master Aug 1, 2026
28 checks passed
@cagnulein
cagnulein deleted the claude/qz-ai-app-issues-gmail-ld44zu branch August 1, 2026 14:36
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