Background
PR #2578 fixed the per-second FPS-meter stutter by promoting the PAN/WF readouts from painter-drawn-into-overlay-QImage to two QLabel children of SpectrumWidget. As part of that change, drawFpsMeters() was kept in place but gated with an early-return when both labels exist:
void SpectrumWidget::drawFpsMeters(QPainter& p, const QRect& specRect, const QRect& wfRect)
{
if (!m_showFpsMeters)
return;
if (m_panFpsMeterLabel && m_wfFpsMeterLabel) {
return; // ← always true after construction
}
// ... legacy painter implementation follows
}
The labels are unconditionally constructed in the SpectrumWidget constructor via createFpsMeterLabels(), so the painter path is unreachable in practice. It survives only as a defensive fallback against label-construction failure (which doesn't realistically happen — new QLabel(this) only fails on OOM, and at that point the app is in a much worse state).
Suggested cleanup
- Delete the body of
drawFpsMeters() and its declaration in SpectrumWidget.h.
- Remove its call sites in the GPU and raster paint paths (
renderGpuFrame() and paintEvent()).
- Remove any related painter setup that's exclusive to this function (font save/restore, color picks).
Estimated diff: ~40 lines removed, no behavioral change since the painter path doesn't fire today.
Scope and risk
- Pure dead-code removal once verified
- The
m_panadapterFps / m_waterfallFps members and m_fpsMeterTimer stay (they drive the labels)
- The
recordPanadapterFrame() / recordWaterfallFrame() accumulators stay
- No protocol, persistence, or UX change
Context
Anyone (including AetherClaude) can pick this up — small, well-scoped, mechanical.
73, Jeremy KK7GWY & Claude (AI dev partner)
Background
PR #2578 fixed the per-second FPS-meter stutter by promoting the PAN/WF readouts from painter-drawn-into-overlay-QImage to two
QLabelchildren ofSpectrumWidget. As part of that change,drawFpsMeters()was kept in place but gated with an early-return when both labels exist:The labels are unconditionally constructed in the
SpectrumWidgetconstructor viacreateFpsMeterLabels(), so the painter path is unreachable in practice. It survives only as a defensive fallback against label-construction failure (which doesn't realistically happen —new QLabel(this)only fails on OOM, and at that point the app is in a much worse state).Suggested cleanup
drawFpsMeters()and its declaration inSpectrumWidget.h.renderGpuFrame()andpaintEvent()).Estimated diff: ~40 lines removed, no behavioral change since the painter path doesn't fire today.
Scope and risk
m_panadapterFps/m_waterfallFpsmembers andm_fpsMeterTimerstay (they drive the labels)recordPanadapterFrame()/recordWaterfallFrame()accumulators stayContext
b8c156b7)feedback_pr_stale_code_check.mddiscipline — flagged at merge time, deferred to a separate PR to keep Avoid FPS meter overlay redraw stutter #2578's diff focused on the actual fixAnyone (including AetherClaude) can pick this up — small, well-scoped, mechanical.
73, Jeremy KK7GWY & Claude (AI dev partner)