From e52ea2a25500e27d10f33e290ceeb5de44e7a256 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Tue, 24 Sep 2024 20:40:35 +0200 Subject: [PATCH] Add parameter variable names --- src/analyzer/analyzerbase.cpp | 6 ++++-- src/analyzer/analyzerbase.h | 8 ++++---- src/analyzer/blockanalyzer.cpp | 4 +++- src/analyzer/blockanalyzer.h | 2 +- src/analyzer/waverubberanalyzer.cpp | 4 ++-- src/core/networktimeouts.h | 2 +- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/analyzer/analyzerbase.cpp b/src/analyzer/analyzerbase.cpp index 5a9c7e5bc..de20dc139 100644 --- a/src/analyzer/analyzerbase.cpp +++ b/src/analyzer/analyzerbase.cpp @@ -67,11 +67,13 @@ AnalyzerBase::~AnalyzerBase() { delete fht_; } -void AnalyzerBase::showEvent(QShowEvent*) { +void AnalyzerBase::showEvent(QShowEvent *e) { + Q_UNUSED(e) timer_.start(timeout(), this); } -void AnalyzerBase::hideEvent(QHideEvent*) { +void AnalyzerBase::hideEvent(QHideEvent *e) { + Q_UNUSED(e) timer_.stop(); } diff --git a/src/analyzer/analyzerbase.h b/src/analyzer/analyzerbase.h index 4e80c2121..905373b3a 100644 --- a/src/analyzer/analyzerbase.h +++ b/src/analyzer/analyzerbase.h @@ -65,13 +65,13 @@ class AnalyzerBase : public QWidget { using Scope = std::vector; explicit AnalyzerBase(QWidget*, const uint scopeSize = 7); - void hideEvent(QHideEvent*) override; - void showEvent(QShowEvent*) override; + void hideEvent(QHideEvent *e) override; + void showEvent(QShowEvent *e) override; void paintEvent(QPaintEvent *e) override; void timerEvent(QTimerEvent *e) override; - int resizeExponent(int); - int resizeForBands(const int); + int resizeExponent(int exp); + int resizeForBands(const int bands); virtual void init() {} virtual void transform(Scope&); virtual void analyze(QPainter &p, const Scope&, const bool new_frame) = 0; diff --git a/src/analyzer/blockanalyzer.cpp b/src/analyzer/blockanalyzer.cpp index 42635d1fe..b86b125ab 100644 --- a/src/analyzer/blockanalyzer.cpp +++ b/src/analyzer/blockanalyzer.cpp @@ -340,7 +340,9 @@ QColor ensureContrast(const QColor &bg, const QColor &fg, int amount) { } -void BlockAnalyzer::paletteChange(const QPalette&) { +void BlockAnalyzer::paletteChange(const QPalette &_palette) { + + Q_UNUSED(_palette) const QColor bg = palette().color(QPalette::Window); const QColor fg = ensureContrast(bg, palette().color(QPalette::Highlight)); diff --git a/src/analyzer/blockanalyzer.h b/src/analyzer/blockanalyzer.h index df911d647..71454b94e 100644 --- a/src/analyzer/blockanalyzer.h +++ b/src/analyzer/blockanalyzer.h @@ -49,7 +49,7 @@ class BlockAnalyzer : public AnalyzerBase { void transform(Scope&) override; void analyze(QPainter &p, const Scope &s, const bool new_frame) override; void resizeEvent(QResizeEvent*) override; - virtual void paletteChange(const QPalette&); + virtual void paletteChange(const QPalette &_palette); void framerateChanged() override; void drawBackground(); diff --git a/src/analyzer/waverubberanalyzer.cpp b/src/analyzer/waverubberanalyzer.cpp index cbb7a84bb..dd2ecf07a 100644 --- a/src/analyzer/waverubberanalyzer.cpp +++ b/src/analyzer/waverubberanalyzer.cpp @@ -82,9 +82,9 @@ void WaveRubberAnalyzer::analyze(QPainter &p, const Scope &s, const bool new_fra } -void WaveRubberAnalyzer::transform(Scope &s) { +void WaveRubberAnalyzer::transform(Scope &scope) { // No need transformation for waveform analyzer - Q_UNUSED(s); + Q_UNUSED(scope); } void WaveRubberAnalyzer::demo(QPainter &p) { diff --git a/src/core/networktimeouts.h b/src/core/networktimeouts.h index c55d0f5d2..4b83c294a 100644 --- a/src/core/networktimeouts.h +++ b/src/core/networktimeouts.h @@ -37,7 +37,7 @@ class NetworkTimeouts : public QObject { explicit NetworkTimeouts(const int timeout_msec, QObject *parent = nullptr); void AddReply(QNetworkReply *reply); - void SetTimeout(int msec) { timeout_msec_ = msec; } + void SetTimeout(const int msec) { timeout_msec_ = msec; } protected: void timerEvent(QTimerEvent *e) override;