refactor(gui): remove dead drawFpsMeters() painter path (#2602)#2632
Merged
Conversation
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.
Contributor
Author
There was a problem hiding this comment.
Looks good — verified the painter path was genuinely dead:
createFpsMeterLabels()is called unconditionally from theSpectrumWidgetconstructor, som_panFpsMeterLabelandm_wfFpsMeterLabelare always non-null after construction.- The old
drawFpsMeters()guarded withif (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 andsetShowFpsMeters(). - Both call sites (
renderGpuFrameandpaintEvent) are removed cleanly; no other references todrawFpsMetersremain.
Scope is tight (2 files, deletions only), no behavior change, no resource/RAII concerns. Thanks for the cleanup!
ten9876
approved these changes
May 14, 2026
ten9876
left a comment
Collaborator
There was a problem hiding this comment.
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.
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 #2602
What was changed
refactor(gui): remove dead drawFpsMeters() painter path (#2602)
Files modified
src/gui/SpectrumWidget.cppsrc/gui/SpectrumWidget.hGenerated by AetherClaude (automated agent for AetherSDR)