Use override
This commit is contained in:
parent
54315a3739
commit
de558048ce
|
@ -58,11 +58,11 @@ public:
|
|||
bool isFetchingCover() const;
|
||||
TagParser::TagValue fieldValue(int row, TagParser::KnownField knownField) const;
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
const QByteArray *cover(const QModelIndex &index) const;
|
||||
virtual bool fetchCover(const QModelIndex &index);
|
||||
const QString *lyrics(const QModelIndex &index) const;
|
||||
|
|
|
@ -23,7 +23,7 @@ class AttachmentsEdit : public QWidget {
|
|||
|
||||
public:
|
||||
explicit AttachmentsEdit(TagParser::MediaFileInfo *fileInfo, QWidget *parent = nullptr);
|
||||
~AttachmentsEdit();
|
||||
~AttachmentsEdit() override;
|
||||
|
||||
TagParser::MediaFileInfo *fileInfo();
|
||||
void setFileInfo(TagParser::MediaFileInfo *fileInfo, bool updateUi = true);
|
||||
|
|
|
@ -43,17 +43,17 @@ class AttachmentsModel : public QAbstractTableModel {
|
|||
Q_OBJECT
|
||||
public:
|
||||
AttachmentsModel(QObject *parent = nullptr);
|
||||
~AttachmentsModel();
|
||||
~AttachmentsModel() override;
|
||||
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role);
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
|
||||
void revert();
|
||||
bool submit();
|
||||
void revert() override;
|
||||
bool submit() override;
|
||||
void repealSelection();
|
||||
|
||||
TagParser::AbstractAttachment *attachment(const QModelIndex &index);
|
||||
|
|
|
@ -8,13 +8,13 @@ namespace QtGui {
|
|||
class CodeEdit : public QPlainTextEdit {
|
||||
public:
|
||||
CodeEdit(QWidget *parent = nullptr);
|
||||
~CodeEdit();
|
||||
~CodeEdit() override;
|
||||
|
||||
const QString &indentation() const;
|
||||
void setIndentation(const QString &indentation);
|
||||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
|
||||
private:
|
||||
void handleReturn(QKeyEvent *e);
|
||||
|
|
|
@ -29,7 +29,7 @@ class DbQueryWidget : public QWidget {
|
|||
|
||||
public:
|
||||
explicit DbQueryWidget(TagEditorWidget *tagEditorWidget, QWidget *parent = nullptr);
|
||||
~DbQueryWidget();
|
||||
~DbQueryWidget() override;
|
||||
|
||||
void insertSearchTermsFromTagEdit(TagEdit *tagEdit, bool songSpecific = false);
|
||||
SongDescription currentSongDescription() const;
|
||||
|
@ -63,7 +63,7 @@ private slots:
|
|||
void showLyricsFromIndex(const QModelIndex &index);
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
|
||||
private:
|
||||
void useQueryResults(QueryResultsModel *queryResults);
|
||||
|
|
|
@ -28,7 +28,7 @@ class EnterTargetDialog : public QDialog {
|
|||
|
||||
public:
|
||||
explicit EnterTargetDialog(QWidget *parent = nullptr);
|
||||
~EnterTargetDialog();
|
||||
~EnterTargetDialog() override;
|
||||
|
||||
TagParser::TagTarget target() const;
|
||||
void setTarget(const TagParser::TagTarget &target, const TagParser::MediaFileInfo *file = nullptr);
|
||||
|
|
|
@ -21,8 +21,8 @@ public:
|
|||
bool isFileAccepted(const QString &path) const;
|
||||
|
||||
protected:
|
||||
virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
|
||||
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
|
||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
||||
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
|
||||
|
||||
private:
|
||||
bool m_filterEnabled;
|
||||
|
|
|
@ -18,7 +18,7 @@ class FileInfoModel : public QStandardItemModel {
|
|||
public:
|
||||
explicit FileInfoModel(QObject *parent = nullptr);
|
||||
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
|
||||
const TagParser::MediaFileInfo *fileInfo() const;
|
||||
void setFileInfo(TagParser::MediaFileInfo &fileInfo, TagParser::Diagnostics &diag, TagParser::Diagnostics *diagReparsing = nullptr);
|
||||
|
|
|
@ -39,7 +39,7 @@ class MainWindow : public QMainWindow {
|
|||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
~MainWindow() override;
|
||||
|
||||
// file browser
|
||||
QString currentDirectory() const;
|
||||
|
@ -52,7 +52,7 @@ public slots:
|
|||
void startParsing(const QString &path);
|
||||
|
||||
protected:
|
||||
bool event(QEvent *event);
|
||||
bool event(QEvent *event) override;
|
||||
|
||||
private slots:
|
||||
// file selection
|
||||
|
|
|
@ -11,8 +11,8 @@ public:
|
|||
explicit MinimumEmptySpinBox(QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
virtual int valueFromText(const QString &text) const;
|
||||
virtual QString textFromValue(int val) const;
|
||||
int valueFromText(const QString &text) const override;
|
||||
QString textFromValue(int val) const override;
|
||||
};
|
||||
|
||||
} // namespace QtGui
|
||||
|
|
|
@ -38,8 +38,8 @@ public:
|
|||
std::size_t maxLineCount() const;
|
||||
std::size_t currentLineCount() const;
|
||||
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSizeHint() const override;
|
||||
|
||||
public slots:
|
||||
void setText(const QString &text);
|
||||
|
@ -54,8 +54,8 @@ public slots:
|
|||
void setMaxLineCount(std::size_t maxLineCount);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
void mouseDoubleClickEvent(QMouseEvent *event);
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void updateAnimation();
|
||||
|
|
|
@ -12,11 +12,11 @@ class DiagModel : public QAbstractListModel {
|
|||
public:
|
||||
explicit DiagModel(QObject *parent = nullptr);
|
||||
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
int columnCount(const QModelIndex &parent) const;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
int columnCount(const QModelIndex &parent) const override;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
const TagParser::Diagnostics &diagnostics() const;
|
||||
void setDiagnostics(const TagParser::Diagnostics &diagnostics);
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
void editText(const QString &text);
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent(QContextMenuEvent *event);
|
||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||
};
|
||||
|
||||
} // namespace QtGui
|
||||
|
|
|
@ -36,7 +36,7 @@ class PicturePreviewSelection : public QWidget {
|
|||
public:
|
||||
explicit PicturePreviewSelection(
|
||||
TagParser::Tag *tag = nullptr, TagParser::KnownField field = TagParser::KnownField::Invalid, QWidget *parent = nullptr);
|
||||
~PicturePreviewSelection();
|
||||
~PicturePreviewSelection() override;
|
||||
|
||||
TagParser::Tag *tag() const;
|
||||
TagParser::KnownField field() const;
|
||||
|
@ -64,10 +64,10 @@ signals:
|
|||
void pictureChanged();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *event);
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
void dragEnterEvent(QDragEnterEvent *event);
|
||||
void dropEvent(QDropEvent *event);
|
||||
void changeEvent(QEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
void dragEnterEvent(QDragEnterEvent *event) override;
|
||||
void dropEvent(QDropEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void typeSwitched(int index);
|
||||
|
|
|
@ -26,13 +26,13 @@ class RenameFilesDialog : public QDialog {
|
|||
|
||||
public:
|
||||
explicit RenameFilesDialog(QWidget *parent = nullptr);
|
||||
~RenameFilesDialog();
|
||||
~RenameFilesDialog() override;
|
||||
|
||||
QString directory() const;
|
||||
void setDirectory(const QString &directory);
|
||||
|
||||
protected:
|
||||
bool event(QEvent *event);
|
||||
bool event(QEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void showScriptFileSelectionDlg();
|
||||
|
|
|
@ -51,7 +51,7 @@ class SettingsDialog : public Dialogs::SettingsDialog {
|
|||
Q_OBJECT
|
||||
public:
|
||||
explicit SettingsDialog(QWidget *parent = nullptr);
|
||||
~SettingsDialog();
|
||||
~SettingsDialog() override;
|
||||
};
|
||||
|
||||
} // namespace QtGui
|
||||
|
|
|
@ -44,7 +44,7 @@ class TagEditorWidget : public QWidget {
|
|||
|
||||
public:
|
||||
explicit TagEditorWidget(QWidget *parent = nullptr);
|
||||
~TagEditorWidget();
|
||||
~TagEditorWidget() override;
|
||||
|
||||
public:
|
||||
bool isFileOperationOngoing() const;
|
||||
|
@ -93,7 +93,7 @@ signals:
|
|||
void fileShown();
|
||||
|
||||
protected:
|
||||
bool event(QEvent *event);
|
||||
bool event(QEvent *event) override;
|
||||
|
||||
private slots:
|
||||
// editor
|
||||
|
|
|
@ -60,7 +60,7 @@ signals:
|
|||
void returnPressed();
|
||||
|
||||
protected:
|
||||
virtual bool eventFilter(QObject *obj, QEvent *event);
|
||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void handleRestoreButtonClicked();
|
||||
|
|
|
@ -18,16 +18,16 @@ public:
|
|||
void setRootItem(FileSystemItem *rootItem);
|
||||
FileSystemItem *fileSystemItemFromIndex(const QModelIndex &index);
|
||||
const FileSystemItem *fileSystemItemFromIndex(const QModelIndex &index) const;
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role);
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||
QModelIndex index(FileSystemItem *item, int column = 0) const;
|
||||
QModelIndex parent(const QModelIndex &index) const;
|
||||
QModelIndex parent(const QModelIndex &index) const override;
|
||||
QModelIndex counterpart(const QModelIndex &index, int column);
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex &index = QModelIndex()) const;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
bool hasChildren(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &index = QModelIndex()) const override;
|
||||
|
||||
private:
|
||||
FileSystemItem *m_rootItem;
|
||||
|
|
|
@ -17,8 +17,8 @@ public:
|
|||
void setStatusFilter(ItemStatus statusFilter);
|
||||
|
||||
protected:
|
||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
|
||||
bool filterAcceptsColumn(int sourceColumn, const QModelIndex &sourceParent) const;
|
||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
||||
bool filterAcceptsColumn(int sourceColumn, const QModelIndex &sourceParent) const override;
|
||||
|
||||
private:
|
||||
ItemStatus m_statusFilter;
|
||||
|
|
Loading…
Reference in New Issue