Use override

This commit is contained in:
Jonas Kvinge
2020-06-15 21:55:05 +02:00
parent 72ede666d4
commit 651020388d
271 changed files with 1199 additions and 1231 deletions

View File

@@ -55,7 +55,7 @@ class Base : public QWidget {
Q_OBJECT
public:
~Base() { delete fht_; }
~Base() override { delete fht_; }
uint timeout() const { return timeout_; }
@@ -74,10 +74,10 @@ class Base : public QWidget {
protected:
explicit Base(QWidget*, uint scopeSize = 7);
void hideEvent(QHideEvent*);
void showEvent(QShowEvent*);
void paintEvent(QPaintEvent*);
void timerEvent(QTimerEvent*);
void hideEvent(QHideEvent*) override;
void showEvent(QShowEvent*) override;
void paintEvent(QPaintEvent*) override;
void timerEvent(QTimerEvent*) override;
void polishEvent();

View File

@@ -44,7 +44,7 @@ class AnalyzerContainer : public QWidget {
Q_OBJECT
public:
AnalyzerContainer(QWidget* parent);
explicit AnalyzerContainer(QWidget *parent);
void SetEngine(EngineBase *engine);
void SetActions(QAction *visualisation);
@@ -52,12 +52,12 @@ class AnalyzerContainer : public QWidget {
static const char *kSettingsGroup;
static const char *kSettingsFramerate;
signals:
signals:
void WheelEvent(int delta);
protected:
void mouseReleaseEvent(QMouseEvent*);
void wheelEvent(QWheelEvent *e);
void mouseReleaseEvent(QMouseEvent*) override;
void wheelEvent(QWheelEvent *e) override;
private slots:
void ChangeAnalyzer(int id);

View File

@@ -67,8 +67,6 @@ BlockAnalyzer::BlockAnalyzer(QWidget *parent)
}
BlockAnalyzer::~BlockAnalyzer() {}
void BlockAnalyzer::resizeEvent(QResizeEvent *e) {
QWidget::resizeEvent(e);

View File

@@ -39,9 +39,9 @@ class QResizeEvent;
class BlockAnalyzer : public Analyzer::Base {
Q_OBJECT
public:
Q_INVOKABLE BlockAnalyzer(QWidget*);
~BlockAnalyzer();
static const uint kHeight;
static const uint kWidth;
@@ -53,11 +53,11 @@ class BlockAnalyzer : public Analyzer::Base {
static const char *kName;
protected:
virtual void transform(Analyzer::Scope&);
virtual void analyze(QPainter &p, const Analyzer::Scope&, bool new_frame);
virtual void resizeEvent(QResizeEvent*);
void transform(Analyzer::Scope&) override;
void analyze(QPainter &p, const Analyzer::Scope&, bool new_frame) override;
void resizeEvent(QResizeEvent*) override;
virtual void paletteChange(const QPalette&);
virtual void framerateChanged();
void framerateChanged() override;
void drawBackground();
void determineStep();

View File

@@ -44,15 +44,15 @@ class BoomAnalyzer : public Analyzer::Base {
static const char* kName;
virtual void transform(Analyzer::Scope& s);
virtual void analyze(QPainter& p, const Analyzer::Scope&, bool new_frame);
void transform(Analyzer::Scope& s) override;
void analyze(QPainter& p, const Analyzer::Scope&, bool new_frame) override;
public slots:
void changeK_barHeight(int);
void changeF_peakSpeed(int);
protected:
void resizeEvent(QResizeEvent* e);
void resizeEvent(QResizeEvent* e) override;
static const uint kColumnWidth;
static const uint kMaxBandCount;

View File

@@ -53,11 +53,11 @@ class RainbowAnalyzer : public Analyzer::Base {
RainbowAnalyzer(const RainbowType& rbtype, QWidget* parent);
protected:
void transform(Analyzer::Scope&);
void analyze(QPainter& p, const Analyzer::Scope&, bool new_frame);
void transform(Analyzer::Scope&) override;
void analyze(QPainter& p, const Analyzer::Scope&, bool new_frame) override;
void timerEvent(QTimerEvent* e);
void resizeEvent(QResizeEvent* e);
void timerEvent(QTimerEvent* e) override;
void resizeEvent(QResizeEvent* e) override;
private:
static const int kHeight[];