add missing override and explicit specifiers in src/client (#5523)

This commit is contained in:
RickyRister 2025-01-25 06:03:54 -08:00 committed by GitHub
parent 37a0c00b3f
commit 42e4c14a82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 20 additions and 19 deletions

View file

@ -98,8 +98,8 @@ protected:
virtual void sendCommandContainer(const CommandContainer &cont) = 0; virtual void sendCommandContainer(const CommandContainer &cont) = 0;
public: public:
AbstractClient(QObject *parent = nullptr); explicit AbstractClient(QObject *parent = nullptr);
~AbstractClient(); ~AbstractClient() override;
ClientStatus getStatus() const ClientStatus getStatus() const
{ {

View file

@ -23,7 +23,7 @@ signals:
void onCtrlC(); void onCtrlC();
protected: protected:
virtual bool eventFilter(QObject *, QEvent *event); bool eventFilter(QObject *, QEvent *event) override;
}; };
#endif #endif

View file

@ -57,28 +57,29 @@ public:
SortRole = Qt::UserRole SortRole = Qt::UserRole
}; };
SetsModel(CardDatabase *_db, QObject *parent = nullptr); explicit SetsModel(CardDatabase *_db, QObject *parent = nullptr);
~SetsModel(); ~SetsModel() override;
int rowCount(const QModelIndex &parent = QModelIndex()) const; int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const int columnCount(const QModelIndex &parent = QModelIndex()) const override
{ {
Q_UNUSED(parent); Q_UNUSED(parent);
return NUM_COLS; return NUM_COLS;
} }
QVariant data(const QModelIndex &index, int role) const; QVariant data(const QModelIndex &index, int role) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role); bool setData(const QModelIndex &index, const QVariant &value, int role) override;
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;
Qt::ItemFlags flags(const QModelIndex &index) const; Qt::ItemFlags flags(const QModelIndex &index) const override;
Qt::DropActions supportedDropActions() const; Qt::DropActions supportedDropActions() const override;
QMimeData *mimeData(const QModelIndexList &indexes) const; QMimeData *mimeData(const QModelIndexList &indexes) const override;
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent); bool
QStringList mimeTypes() const; dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
QStringList mimeTypes() const override;
void swapRows(int oldRow, int newRow); void swapRows(int oldRow, int newRow);
void toggleRow(int row, bool enable); void toggleRow(int row, bool enable);
void toggleRow(int row); void toggleRow(int row);
void toggleAll(bool); void toggleAll(bool);
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder); void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
void save(CardDatabase *db); void save(CardDatabase *db);
void restore(CardDatabase *db); void restore(CardDatabase *db);
void restoreOriginalOrder(); void restoreOriginalOrder();
@ -88,7 +89,7 @@ class SetsDisplayModel : public QSortFilterProxyModel
{ {
Q_OBJECT Q_OBJECT
public: public:
SetsDisplayModel(QObject *parent = NULL); explicit SetsDisplayModel(QObject *parent = nullptr);
protected: protected:
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;

View file

@ -33,7 +33,7 @@ private slots:
void getAnalyzeRequestData(DeckList *deck, QByteArray *data); void getAnalyzeRequestData(DeckList *deck, QByteArray *data);
public: public:
TappedOutInterface(CardDatabase &_cardDatabase, QObject *parent = nullptr); explicit TappedOutInterface(CardDatabase &_cardDatabase, QObject *parent = nullptr);
void analyzeDeck(DeckList *deck); void analyzeDeck(DeckList *deck);
}; };

View file

@ -14,7 +14,7 @@ class UpdateDownloader : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
UpdateDownloader(QObject *parent); explicit UpdateDownloader(QObject *parent);
void beginDownload(QUrl url); void beginDownload(QUrl url);
signals: signals:
void downloadSuccessful(QUrl filepath); void downloadSuccessful(QUrl filepath);