Skip to content

refactor(gui): remove dead drawFpsMeters() painter path (#2602)#2632

Merged
aethersdr-agent[bot] merged 1 commit into
mainfrom
aetherclaude/issue-2602
May 14, 2026
Merged

refactor(gui): remove dead drawFpsMeters() painter path (#2602)#2632
aethersdr-agent[bot] merged 1 commit into
mainfrom
aetherclaude/issue-2602

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

Fixes #2602

What was changed

refactor(gui): remove dead drawFpsMeters() painter path (#2602)

Files modified

  • src/gui/SpectrumWidget.cpp
  • src/gui/SpectrumWidget.h
 src/gui/SpectrumWidget.cpp | 68 ----------------------------------------------
 src/gui/SpectrumWidget.h   |  1 -
 2 files changed, 69 deletions(-)

Generated by AetherClaude (automated agent for AetherSDR)

The painter-based FPS readout was superseded by QLabel children in #2578
and immediately gated with an early-return when both labels exist. Since
createFpsMeterLabels() runs unconditionally in the SpectrumWidget
constructor, the painter path was unreachable.

Drops the function body, declaration, and both call sites in
renderGpuFrame() and paintEvent(). FPS accumulators, timer, and label
plumbing stay — they drive the live readouts.

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good — verified the painter path was genuinely dead:

  • createFpsMeterLabels() is called unconditionally from the SpectrumWidget constructor, so m_panFpsMeterLabel and m_wfFpsMeterLabel are always non-null after construction.
  • The old drawFpsMeters() guarded with if (m_panFpsMeterLabel && m_wfFpsMeterLabel) return;, meaning the painter body was unreachable.
  • The QLabel-based meters (createFpsMeterLabels / updateFpsMeterLabels / positionFpsMeterLabels) remain the live implementation and are still wired to the FPS timer and setShowFpsMeters().
  • Both call sites (renderGpuFrame and paintEvent) are removed cleanly; no other references to drawFpsMeters remain.

Scope is tight (2 files, deletions only), no behavior change, no resource/RAII concerns. Thanks for the cleanup!

@ten9876 ten9876 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Painter path verified unreachable — createFpsMeterLabels() unconditionally constructs both labels in the SpectrumWidget constructor, so the early-return guard in the old drawFpsMeters() was always true. All supporting state preserved per the issue spec.

@aethersdr-agent aethersdr-agent Bot merged commit bd98949 into main May 14, 2026
5 checks passed
@aethersdr-agent aethersdr-agent Bot deleted the aetherclaude/issue-2602 branch May 14, 2026 03:12
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.

SpectrumWidget: remove dead drawFpsMeters() painter path

1 participant