From f8c7728391aa7a8a98b654e1624ce981d8a4b601 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 18 Apr 2026 15:19:24 +0000 Subject: [PATCH] Polish freqdisplay naming clarity in GUI constants Agent-Logs-Url: https://github.com/srcejon/sdrangel/sessions/3b53c052-7f2b-4597-b509-d7cc17f3b0b0 Co-authored-by: srcejon <57259258+srcejon@users.noreply.github.com> --- plugins/feature/freqdisplay/freqdisplaygui.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/feature/freqdisplay/freqdisplaygui.cpp b/plugins/feature/freqdisplay/freqdisplaygui.cpp index b5412f602..5bba06e0d 100644 --- a/plugins/feature/freqdisplay/freqdisplaygui.cpp +++ b/plugins/feature/freqdisplay/freqdisplaygui.cpp @@ -14,7 +14,7 @@ namespace { // For typical feature windows this keeps the text close to ~22% of the smallest // widget dimension, which yields large readable digits without clipping. constexpr double frequencyFontScale = 0.22; -constexpr const char* rxTxKinds = "RT"; +constexpr const char* rxTxChannelKinds = "RT"; constexpr int pollIntervalMs = 1000; constexpr int minimumFrequencyFontPointSize = 10; } @@ -61,7 +61,7 @@ FreqDisplayGUI::FreqDisplayGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, FeatureGUI(parent), ui(new Ui::FreqDisplayGUI), m_freqDisplay(reinterpret_cast(feature)), - m_availableChannelOrFeatureHandler(QStringList(), rxTxKinds), + m_availableChannelOrFeatureHandler(QStringList(), rxTxChannelKinds), m_doApplySettings(true) { (void) pluginAPI; @@ -230,9 +230,9 @@ void FreqDisplayGUI::updateFrequencyText() return; } - const qint64 centerFrequencyRounded = qRound64(centerFrequencyHz); + const qint64 centerFrequency = qRound64(centerFrequencyHz); const qint64 channelOffset = static_cast(offsetHz); - const qint64 absoluteFrequency = centerFrequencyRounded + channelOffset; + const qint64 absoluteFrequency = centerFrequency + channelOffset; ui->frequencyValue->setText(tr("%1 Hz").arg(QLocale().toString(absoluteFrequency))); updateFrequencyFont(); }