refactor: Use override instead of virtual where possible (#4917)
This commit is contained in:
@@ -37,7 +37,7 @@ public:
|
||||
*/
|
||||
ColorPickerDialog(const QColor &initial, QWidget *parent);
|
||||
|
||||
~ColorPickerDialog();
|
||||
~ColorPickerDialog() override;
|
||||
|
||||
/**
|
||||
* @brief Return the final color selected by the user.
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -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_{};
|
||||
|
||||
Reference in New Issue
Block a user