refactor: Use override instead of virtual where possible (#4917)

This commit is contained in:
pajlada
2023-10-25 18:13:48 +02:00
committed by GitHub
parent da31e47f9a
commit 5c0219c245
54 changed files with 193 additions and 203 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ public:
*/
ColorPickerDialog(const QColor &initial, QWidget *parent);
~ColorPickerDialog();
~ColorPickerDialog() override;
/**
* @brief Return the final color selected by the user.
+1 -1
View File
@@ -22,7 +22,7 @@ class IrcConnectionEditor : public QDialog
public:
explicit IrcConnectionEditor(const IrcServerData &data, bool isAdd = false,
QWidget *parent = nullptr);
~IrcConnectionEditor();
~IrcConnectionEditor() override;
IrcServerData data();
+3 -3
View File
@@ -27,8 +27,8 @@ public:
pajlada::Signals::NoArgSignal closed;
protected:
virtual void closeEvent(QCloseEvent *) override;
virtual void themeChangedEvent() override;
void closeEvent(QCloseEvent *) override;
void themeChangedEvent() override;
private:
class EventFilter : public QObject
@@ -37,7 +37,7 @@ private:
SelectChannelDialog *dialog;
protected:
virtual bool eventFilter(QObject *watched, QEvent *event) override;
bool eventFilter(QObject *watched, QEvent *event) override;
};
struct {
+3 -3
View File
@@ -42,9 +42,9 @@ public:
SettingsDialogPreference::NoPreference);
protected:
virtual void scaleChangedEvent(float newDpi) override;
virtual void themeChangedEvent() override;
virtual void showEvent(QShowEvent *) override;
void scaleChangedEvent(float newDpi) override;
void themeChangedEvent() override;
void showEvent(QShowEvent *) override;
private:
void refresh();
+2 -2
View File
@@ -30,8 +30,8 @@ public:
const ChannelPtr &openingChannel);
protected:
virtual void themeChangedEvent() override;
virtual void scaleChangedEvent(float scale) override;
void themeChangedEvent() override;
void scaleChangedEvent(float scale) override;
private:
void installEvents();
@@ -18,10 +18,10 @@ public:
/**
* @brief Open the channel passed in the constructor in a new popup.
*/
virtual void action() override;
void action() override;
virtual void paint(QPainter *painter, const QRect &rect) const override;
virtual QSize sizeHint(const QRect &rect) const override;
void paint(QPainter *painter, const QRect &rect) const override;
QSize sizeHint(const QRect &rect) const override;
private:
static constexpr const char *TEXT_FORMAT =
+3 -3
View File
@@ -20,10 +20,10 @@ public:
/**
* @brief Open the channel passed in the constructor in a new tab.
*/
virtual void action() override;
void action() override;
virtual void paint(QPainter *painter, const QRect &rect) const override;
virtual QSize sizeHint(const QRect &rect) const override;
void paint(QPainter *painter, const QRect &rect) const override;
QSize sizeHint(const QRect &rect) const override;
private:
static constexpr const char *TEXT_FORMAT = "Open channel \"%1\" in new tab";
@@ -16,10 +16,10 @@ class SwitchSplitItem : public AbstractSwitcherItem
public:
SwitchSplitItem(SplitContainer *container, Split *split = nullptr);
virtual void action() override;
void action() override;
virtual void paint(QPainter *painter, const QRect &rect) const override;
virtual QSize sizeHint(const QRect &rect) const override;
void paint(QPainter *painter, const QRect &rect) const override;
QSize sizeHint(const QRect &rect) const override;
private:
SplitContainer *container_{};