Use override
This commit is contained in:
@@ -38,9 +38,9 @@ class Ui_AppearanceSettingsPage;
|
||||
class AppearanceSettingsPage : public SettingsPage {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
public:
|
||||
explicit AppearanceSettingsPage(SettingsDialog *dialog);
|
||||
~AppearanceSettingsPage();
|
||||
~AppearanceSettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
@@ -83,9 +83,9 @@ public:
|
||||
BackgroundImagePosition_BottomRight = 5
|
||||
};
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Cancel();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
void Cancel() override;
|
||||
|
||||
private slots:
|
||||
void SelectForegroundColor();
|
||||
|
||||
@@ -43,13 +43,13 @@ class BackendSettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit BackendSettingsPage(SettingsDialog *dialog);
|
||||
~BackendSettingsPage();
|
||||
~BackendSettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Cancel();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
void Cancel() override;
|
||||
|
||||
EngineBase *engine() const { return dialog()->app()->player()->engine(); }
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class BehaviourSettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit BehaviourSettingsPage(SettingsDialog *dialog);
|
||||
~BehaviourSettingsPage();
|
||||
~BehaviourSettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
@@ -64,8 +64,8 @@ public:
|
||||
PlaylistAddBehaviour_Enqueue = 2,
|
||||
};
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
|
||||
private slots:
|
||||
void ShowTrayIconToggled(bool on);
|
||||
|
||||
@@ -39,7 +39,7 @@ class CollectionSettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit CollectionSettingsPage(SettingsDialog *dialog);
|
||||
~CollectionSettingsPage();
|
||||
~CollectionSettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
static const char *kSettingsCacheSize;
|
||||
@@ -62,8 +62,8 @@ class CollectionSettingsPage : public SettingsPage {
|
||||
SaveCover_Pattern = 2
|
||||
};
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
|
||||
private slots:
|
||||
void Add();
|
||||
|
||||
@@ -40,7 +40,7 @@ class ContextSettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit ContextSettingsPage(SettingsDialog *dialog);
|
||||
~ContextSettingsPage();
|
||||
~ContextSettingsPage() override;
|
||||
|
||||
enum ContextSettingsOrder {
|
||||
ALBUM,
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
static const char *kSettingsGroupEnable[ContextSettingsOrder::NELEMS];
|
||||
static const qreal kDefaultFontSizeHeadline;
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
|
||||
private slots:
|
||||
void InsertVariableFirstLine(QAction *action);
|
||||
|
||||
@@ -39,12 +39,12 @@ class CoversSettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit CoversSettingsPage(SettingsDialog *parent = nullptr);
|
||||
~CoversSettingsPage();
|
||||
~CoversSettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
|
||||
private:
|
||||
void NoProviderSelected();
|
||||
|
||||
@@ -39,12 +39,12 @@ class LyricsSettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit LyricsSettingsPage(SettingsDialog *parent = nullptr);
|
||||
~LyricsSettingsPage();
|
||||
~LyricsSettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
|
||||
private:
|
||||
void NoProviderSelected();
|
||||
|
||||
@@ -34,13 +34,13 @@ class MoodbarSettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit MoodbarSettingsPage(SettingsDialog* dialog);
|
||||
~MoodbarSettingsPage();
|
||||
~MoodbarSettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Cancel();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
void Cancel() override;
|
||||
|
||||
private:
|
||||
static const int kMoodbarPreviewWidth;
|
||||
|
||||
@@ -36,14 +36,15 @@ class NetworkProxySettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit NetworkProxySettingsPage(SettingsDialog* dialog);
|
||||
~NetworkProxySettingsPage();
|
||||
~NetworkProxySettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
|
||||
private:
|
||||
Ui_NetworkProxySettingsPage* ui_;
|
||||
};
|
||||
|
||||
#endif // NETWORKPROXYSETTINGSPAGE_H
|
||||
#endif // NETWORKPROXYSETTINGSPAGE_H
|
||||
|
||||
@@ -41,15 +41,16 @@ class NotificationsSettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit NotificationsSettingsPage(SettingsDialog *dialog);
|
||||
~NotificationsSettingsPage();
|
||||
~NotificationsSettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
|
||||
protected:
|
||||
void hideEvent(QHideEvent*);
|
||||
void showEvent(QShowEvent*);
|
||||
void hideEvent(QHideEvent*) override;
|
||||
void showEvent(QShowEvent*) override;
|
||||
|
||||
private slots:
|
||||
void NotificationTypeChanged();
|
||||
@@ -74,4 +75,4 @@ class NotificationsSettingsPage : public SettingsPage {
|
||||
OSDPretty *pretty_popup_;
|
||||
};
|
||||
|
||||
#endif // NOTIFICATIONSSETTINGSPAGE_H
|
||||
#endif // NOTIFICATIONSSETTINGSPAGE_H
|
||||
|
||||
@@ -36,15 +36,15 @@ class PlaylistSettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit PlaylistSettingsPage(SettingsDialog* dialog);
|
||||
~PlaylistSettingsPage();
|
||||
~PlaylistSettingsPage() override;
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
|
||||
private:
|
||||
Ui_PlaylistSettingsPage* ui_;
|
||||
|
||||
};
|
||||
|
||||
#endif // PLAYLISTSETTINGSPAGE_H
|
||||
#endif // PLAYLISTSETTINGSPAGE_H
|
||||
|
||||
@@ -37,12 +37,12 @@ class ScrobblerSettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit ScrobblerSettingsPage(SettingsDialog *parent);
|
||||
~ScrobblerSettingsPage();
|
||||
~ScrobblerSettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
|
||||
private slots:
|
||||
void LastFM_Login();
|
||||
|
||||
@@ -60,8 +60,8 @@ class Ui_SettingsDialog;
|
||||
class SettingsItemDelegate : public QStyledItemDelegate {
|
||||
public:
|
||||
explicit SettingsItemDelegate(QObject *parent);
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
};
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class SettingsDialog : public QDialog {
|
||||
|
||||
public:
|
||||
explicit SettingsDialog(Application *app, QMainWindow *mainwindow, QWidget *parent = nullptr);
|
||||
~SettingsDialog();
|
||||
~SettingsDialog() override;
|
||||
|
||||
enum Page {
|
||||
Page_Behaviour,
|
||||
@@ -113,8 +113,8 @@ class SettingsDialog : public QDialog {
|
||||
void ComboBoxLoadFromSettings(const QSettings &s, QComboBox *combobox, const QString &setting, const int default_value);
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent *e);
|
||||
void closeEvent(QCloseEvent*);
|
||||
void showEvent(QShowEvent *e) override;
|
||||
void closeEvent(QCloseEvent*) override;
|
||||
|
||||
private:
|
||||
struct PageData {
|
||||
@@ -124,8 +124,8 @@ class SettingsDialog : public QDialog {
|
||||
};
|
||||
|
||||
// QDialog
|
||||
void accept();
|
||||
void reject();
|
||||
void accept() override;
|
||||
void reject() override;
|
||||
|
||||
void LoadGeometry();
|
||||
void SaveGeometry();
|
||||
|
||||
@@ -65,7 +65,7 @@ class SettingsPage : public QWidget {
|
||||
void set_changed() { changed_ = true; }
|
||||
|
||||
protected:
|
||||
virtual void showEvent(QShowEvent *e);
|
||||
void showEvent(QShowEvent *e) override;
|
||||
|
||||
private:
|
||||
virtual void Save() = 0;
|
||||
|
||||
@@ -45,13 +45,14 @@ class GlobalShortcutsSettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit GlobalShortcutsSettingsPage(SettingsDialog *dialog);
|
||||
~GlobalShortcutsSettingsPage();
|
||||
~GlobalShortcutsSettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
bool IsEnabled() const;
|
||||
bool IsEnabled() const override;
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
|
||||
private slots:
|
||||
|
||||
|
||||
@@ -38,14 +38,14 @@ class SubsonicSettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit SubsonicSettingsPage(SettingsDialog* parent = nullptr);
|
||||
~SubsonicSettingsPage();
|
||||
~SubsonicSettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
|
||||
bool eventFilter(QObject *object, QEvent *event);
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
|
||||
signals:
|
||||
void Test();
|
||||
|
||||
@@ -37,7 +37,7 @@ class TidalSettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit TidalSettingsPage(SettingsDialog* parent = nullptr);
|
||||
~TidalSettingsPage();
|
||||
~TidalSettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
@@ -47,10 +47,10 @@ class TidalSettingsPage : public SettingsPage {
|
||||
StreamUrlMethod_PlaybackInfoPostPaywall,
|
||||
};
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
|
||||
bool eventFilter(QObject *object, QEvent *event);
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
|
||||
signals:
|
||||
void Authorize(QString client_id);
|
||||
@@ -68,4 +68,4 @@ class TidalSettingsPage : public SettingsPage {
|
||||
TidalService *service_;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // TIDALSETTINGSPAGE_H
|
||||
|
||||
@@ -36,15 +36,15 @@ class TranscoderSettingsPage : public SettingsPage {
|
||||
|
||||
public:
|
||||
explicit TranscoderSettingsPage(SettingsDialog* dialog);
|
||||
~TranscoderSettingsPage();
|
||||
~TranscoderSettingsPage() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
void Load() override;
|
||||
void Save() override;
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent *e);
|
||||
void showEvent(QShowEvent *e) override;
|
||||
|
||||
private:
|
||||
Ui_TranscoderSettingsPage* ui_;
|
||||
|
||||
Reference in New Issue
Block a user