Use override
This commit is contained in:
@@ -52,9 +52,9 @@ class ContextAlbum : public QWidget {
|
||||
void SetImage(QImage image = QImage());
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*);
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
void mouseDoubleClickEvent(QMouseEvent *e);
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent *e) override;
|
||||
|
||||
private:
|
||||
void DrawImage(QPainter *p);
|
||||
|
||||
@@ -58,7 +58,7 @@ class ContextAlbumsModel : public SimpleTreeModel<CollectionItem> {
|
||||
|
||||
public:
|
||||
explicit ContextAlbumsModel(CollectionBackend *backend, Application *app, QObject *parent = nullptr);
|
||||
~ContextAlbumsModel();
|
||||
~ContextAlbumsModel() override;
|
||||
|
||||
static const int kPrettyCoverSize;
|
||||
|
||||
@@ -81,11 +81,11 @@ class ContextAlbumsModel : public SimpleTreeModel<CollectionItem> {
|
||||
SongList GetChildSongs(const QModelIndex &index) const;
|
||||
SongList GetChildSongs(const QModelIndexList &indexes) const;
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
QStringList mimeTypes() const;
|
||||
QMimeData *mimeData(const QModelIndexList &indexes) const;
|
||||
bool canFetchMore(const QModelIndex &parent) const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
QStringList mimeTypes() const override;
|
||||
QMimeData *mimeData(const QModelIndexList &indexes) const override;
|
||||
bool canFetchMore(const QModelIndex &parent) const override;
|
||||
|
||||
static QString TextOrUnknown(const QString &text);
|
||||
static QString SortText(QString text);
|
||||
@@ -96,7 +96,7 @@ class ContextAlbumsModel : public SimpleTreeModel<CollectionItem> {
|
||||
void AddSongs(const SongList &songs);
|
||||
|
||||
protected:
|
||||
void LazyPopulate(CollectionItem *item) { LazyPopulate(item, true); }
|
||||
void LazyPopulate(CollectionItem *item) override { LazyPopulate(item, true); }
|
||||
void LazyPopulate(CollectionItem *parent, const bool signal);
|
||||
|
||||
private slots:
|
||||
|
||||
@@ -134,7 +134,7 @@ ContextAlbumsView::ContextAlbumsView(QWidget *parent)
|
||||
|
||||
}
|
||||
|
||||
ContextAlbumsView::~ContextAlbumsView() {}
|
||||
ContextAlbumsView::~ContextAlbumsView() = default;
|
||||
|
||||
void ContextAlbumsView::SaveFocus() {
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@ class QMouseEvent;
|
||||
class QPaintEvent;
|
||||
|
||||
class Application;
|
||||
class ContextAlbumsModel;
|
||||
class EditTagDialog;
|
||||
class OrganiseDialog;
|
||||
class ContextAlbumsModel;
|
||||
|
||||
class ContextItemDelegate : public QStyledItemDelegate {
|
||||
Q_OBJECT
|
||||
@@ -57,7 +57,7 @@ class ContextItemDelegate : public QStyledItemDelegate {
|
||||
explicit ContextItemDelegate(QObject *parent);
|
||||
|
||||
public slots:
|
||||
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index);
|
||||
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index) override;
|
||||
};
|
||||
|
||||
class ContextAlbumsView : public AutoExpandingTreeView {
|
||||
@@ -65,7 +65,7 @@ class ContextAlbumsView : public AutoExpandingTreeView {
|
||||
|
||||
public:
|
||||
ContextAlbumsView(QWidget *parent = nullptr);
|
||||
~ContextAlbumsView();
|
||||
~ContextAlbumsView() override;
|
||||
|
||||
// Returns Songs currently selected in the collection view.
|
||||
// Please note that the selection is recursive meaning that if for example an album is selected this will return all of it's songs.
|
||||
@@ -74,7 +74,7 @@ class ContextAlbumsView : public AutoExpandingTreeView {
|
||||
void Init(Application *app);
|
||||
|
||||
// QTreeView
|
||||
void scrollTo(const QModelIndex &index, ScrollHint hint = EnsureVisible);
|
||||
void scrollTo(const QModelIndex &index, ScrollHint hint = EnsureVisible) override;
|
||||
|
||||
ContextAlbumsModel *albums_model() { return model_; }
|
||||
|
||||
@@ -84,9 +84,9 @@ class ContextAlbumsView : public AutoExpandingTreeView {
|
||||
|
||||
protected:
|
||||
// QWidget
|
||||
void paintEvent(QPaintEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *e);
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void mouseReleaseEvent(QMouseEvent *e) override;
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
|
||||
private slots:
|
||||
void Load();
|
||||
|
||||
@@ -65,10 +65,10 @@ class ContextView : public QWidget {
|
||||
Song song_playing() const { return song_playing_; }
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent*);
|
||||
void contextMenuEvent(QContextMenuEvent*);
|
||||
void dragEnterEvent(QDragEnterEvent*);
|
||||
void dropEvent(QDropEvent*);
|
||||
void resizeEvent(QResizeEvent*) override;
|
||||
void contextMenuEvent(QContextMenuEvent*) override;
|
||||
void dragEnterEvent(QDragEnterEvent*) override;
|
||||
void dropEvent(QDropEvent*) override;
|
||||
|
||||
private:
|
||||
void AddActions();
|
||||
|
||||
Reference in New Issue
Block a user