Migrate PropDashboardDialog to PersistentDialog (#2767). Principle III.#2775
Merged
Conversation
Mechanical migration matching PR #2742's recipe (1/3 of the umbrella PersistentDialog work tracked in #2679): - PropDashboardDialog.h now inherits from PersistentDialog; drops the manual m_titleBar/m_bodyLayout members and the setFramelessMode decl (provided by the base class). - Constructor delegates to PersistentDialog("HF Propagation Dashboard", "PropDashboardDialogGeometry", parent) and installs content into bodyWidget() instead of a hand-rolled body widget. - Drops the standalone setFramelessMode() impl and the inline FramelessResizer::install(this) bootstrap. - MainWindow::showPropDashboard() collapses to a single showOrRaisePersistent(m_propDashboardDialog, m_propForecast) call. - Removed the qobject_cast<PropDashboardDialog*> branch from setFramelessWindow(): the m_persistentDialogs registry already auto-propagates frameless toggles to every PersistentDialog-derived child. - Retyped m_propDashboardDialog from QPointer<QDialog> to QPointer<PropDashboardDialog>. The user-facing window title is preserved verbatim ("HF Propagation Dashboard") — Principle III: on-screen labels are inviolable for the user, so the abbreviation in the recipe was not adopted. closeEvent recipe step is a no-op for this dialog (no override exists; base class handles geometry-flush on close). Geometry persists under AppSettings key PropDashboardDialogGeometry. No behavior change to refresh logic, charts, panels, or the NetworkAccessManager fetch path. Blast radius: risk_score=0.163, 2 high-risk affected (top: MainWindow::MainWindow, MainWindow::buildMenuBar). Both are reached through the usual MainWindow include of PropDashboardDialog.h; all PropDashboardDialog references in src/ are accounted for and updated. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
6 tasks
Contributor
Author
There was a problem hiding this comment.
Looks good — clean migration that mirrors the established PersistentDialog pattern.
Verified:
- Constructor correctly passes title + geometry key (
"PropDashboardDialogGeometry") to the base, and the subclass installs its rootQVBoxLayoutonbodyWidget()per the contract documented inPersistentDialog.h:30-38. setMinimumSize()/resize()are called in the ctor before any geometry restore — safe, becausePersistentDialog::showEvent(PersistentDialog.cpp:75-89) defers restore to first show specifically for this reason.- Removing the explicit
qobject_cast<PropDashboardDialog*>(m_propDashboardDialog)->setFramelessMode(on)branch inMainWindow::setFramelessWindowis correct:showOrRaisePersistent(MainWindow.h:727) registers the dialog inm_persistentDialogs, and the existing loop atMainWindow.cpp:11650already propagates frameless mode to every entry. QPointer<QDialog>→QPointer<PropDashboardDialog>is a strict refinement; no callers stored aQDialog*reference.- Local
m_titleBar/m_bodyLayoutmembers andsetFramelessModeoverride are fully removed with no remaining references (verified via grep — the only matches were within the deleted ctor/method bodies).
Side benefit: this dialog now gets geometry persistence across sessions, which it didn't have before.
Thanks for the contribution!
# Conflicts: # src/gui/MainWindow.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2767
What was changed
Migrate PropDashboardDialog to PersistentDialog (#2767). Principle III.
Files modified
src/gui/MainWindow.cppsrc/gui/MainWindow.hsrc/gui/PropDashboardDialog.cppsrc/gui/PropDashboardDialog.hGenerated by AetherClaude (automated agent for AetherSDR)