Skip to content

Remove orphaned Slice<N>_MarkerThin AppSettings key after migration #2143

@ten9876

Description

@ten9876

Context

Follow-up from #2141 (merged), which migrated per-slice marker-style preferences from bool MarkerThin to int MarkerWidth (0 / 1 / 3).

VfoWidget::loadDisplayPrefs() reads the old Slice<N>_MarkerThin key only when the new Slice<N>_MarkerWidth key is absent (true → 1, false → 3), and from then on only writes the new key. The old key is left in ~/.config/AetherSDR/AetherSDR.settings indefinitely. It's cosmetic — nothing reads it anymore — but it accumulates dead state in users' settings files.

Suggested fix

In VfoWidget::loadDisplayPrefs(), after migrating the old value into m_markerWidth, call s.remove(keyT) so subsequent saves don't carry the orphan forward. Pseudo:

if (s.contains(keyW)) {
    m_markerWidth = s.value(keyW, "1").toString().toInt();
} else {
    m_markerWidth = (s.value(keyT, "False").toString() == "True") ? 1 : 3;
    if (s.contains(keyT))
        s.remove(keyT);
}

Then save once on the next opportunity (or eagerly call s.save() after the remove).

Out of scope

  • Renaming any other settings keys.
  • Changing the migration semantics (True → 1, False → 3 is correct).
  • Surfacing the marker preference anywhere outside the per-slice scope.

Tiny cleanup — single-file, ~3-line change. Marked as a good first issue candidate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-responseWaiting for reporter to provide additional informationgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions