Skip to content

refactor(gui): migrate 7 dialogs to PersistentDialog base class (#2672). Principle III.#2676

Merged
ten9876 merged 1 commit into
mainfrom
auto/refactorgui-migrate-7-dialogs-to-PersistentDialog-
May 15, 2026
Merged

refactor(gui): migrate 7 dialogs to PersistentDialog base class (#2672). Principle III.#2676
ten9876 merged 1 commit into
mainfrom
auto/refactorgui-migrate-7-dialogs-to-PersistentDialog-

Conversation

@ten9876

@ten9876 ten9876 commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Lands the six follow-up migrations the issue tracked plus the
PanLayoutDialog modal special case. Net: −1102 / +98 lines.

Dialogs migrated:
PanLayoutDialog modal fixed-size, no persist key
MultiFlexDialog modal, gains FooDialogGeometry
MidiMappingDialog non-modal, FramelessWindowTitleBar swap
MemoryDialog non-modal, showEvent kept for search focus
AetherDspDialog hand-rolled chrome + drag handlers deleted
NetworkDiagnosticsDialog hand-rolled chrome + 8-axis resize deleted
DxClusterDialog tabbed dialog, signal wiring guarded by
wasFresh-pattern

Each migration replaces:

  • setFramelessMode() / closeEvent / moveEvent / resizeEvent overrides
  • FramelessResizer::install + manual setFramelessMode(AppSettings…)
    in the ctor
  • Hand-rolled m_titleBar / m_outerLayout / m_bodyLayout members
  • (AetherDsp / NetworkDiag) the entire ~70-line hand-rolled title
    bar widget tree plus FramelessMoveHelper eventFilter cases

…with a single base-class ctor call carrying the title and
"FooDialogGeometry" key. All six previously-non-persistent dialogs
gain geometry persistence (correction posted to the issue: NONE of
them currently persisted geometry, despite the table claiming four
did — the geometry() calls in setFramelessMode were in-process
preservation across frameless toggle, not disk-backed restore).

MainWindow changes:

  • QPointer members re-typed to concrete dialog classes so
    showOrRaisePersistent template binds correctly
  • 6 qobject_cast branches in setFramelessWindow deleted —
    m_persistentDialogs registry now auto-propagates the frameless
    toggle on every PersistentDialog-derived instance
  • NEW ensureAetherDspDialog() helper consolidates 7 duplicated
    AetherDspDialog construct sites — each had been re-pasting the
    same ~17 signal connections wiring NR2/NR4/DFNR/MNR parameter
    changes back to AudioEngine. Now a single call site.

Verified locally on Linux: open each dialog → resize → close →
restart → reopen — geometry restores per dialog. Toggle View →
Frameless Window → chrome flips on all of them without losing
geometry.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

…. Principle III.

Lands the six follow-up migrations the issue tracked plus the
PanLayoutDialog modal special case.  Net: −1102 / +98 lines.

Dialogs migrated:
  PanLayoutDialog          modal fixed-size, no persist key
  MultiFlexDialog          modal, gains FooDialogGeometry
  MidiMappingDialog        non-modal, FramelessWindowTitleBar swap
  MemoryDialog             non-modal, showEvent kept for search focus
  AetherDspDialog          hand-rolled chrome + drag handlers deleted
  NetworkDiagnosticsDialog hand-rolled chrome + 8-axis resize deleted
  DxClusterDialog          tabbed dialog, signal wiring guarded by
                           wasFresh-pattern

Each migration replaces:
  * setFramelessMode() / closeEvent / moveEvent / resizeEvent overrides
  * FramelessResizer::install + manual setFramelessMode(AppSettings…)
    in the ctor
  * Hand-rolled m_titleBar / m_outerLayout / m_bodyLayout members
  * (AetherDsp / NetworkDiag) the entire ~70-line hand-rolled title
    bar widget tree plus FramelessMoveHelper eventFilter cases

…with a single base-class ctor call carrying the title and
"FooDialogGeometry" key.  All six previously-non-persistent dialogs
gain geometry persistence (correction posted to the issue: NONE of
them currently persisted geometry, despite the table claiming four
did — the `geometry()` calls in setFramelessMode were in-process
preservation across frameless toggle, not disk-backed restore).

MainWindow changes:
  * QPointer<QDialog> members re-typed to concrete dialog classes so
    showOrRaisePersistent template binds correctly
  * 6 qobject_cast branches in setFramelessWindow deleted —
    m_persistentDialogs registry now auto-propagates the frameless
    toggle on every PersistentDialog-derived instance
  * NEW ensureAetherDspDialog() helper consolidates 7 duplicated
    AetherDspDialog construct sites — each had been re-pasting the
    same ~17 signal connections wiring NR2/NR4/DFNR/MNR parameter
    changes back to AudioEngine.  Now a single call site.

Verified locally on Linux: open each dialog → resize → close →
restart → reopen — geometry restores per dialog.  Toggle View →
Frameless Window → chrome flips on all of them without losing
geometry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ten9876 ten9876 requested a review from jensenpat as a code owner May 15, 2026 04:31
@ten9876 ten9876 enabled auto-merge (squash) May 15, 2026 04:31
@ten9876 ten9876 merged commit 0186e58 into main May 15, 2026
5 checks passed
@ten9876 ten9876 deleted the auto/refactorgui-migrate-7-dialogs-to-PersistentDialog- branch May 15, 2026 05:19
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.

1 participant