add missing override and explicit specifiers to all classes in src/game (#5511)

This commit is contained in:
RickyRister 2025-01-22 04:57:56 -08:00 committed by GitHub
parent af161f00b7
commit 66e2e7a473
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 140 additions and 137 deletions

View file

@ -27,16 +27,16 @@ public:
static const int SORT_ROLE = Qt::UserRole + 1;
GamesModel(const QMap<int, QString> &_rooms, const QMap<int, GameTypeMap> &_gameTypes, QObject *parent = nullptr);
int rowCount(const QModelIndex &parent = QModelIndex()) const
int rowCount(const QModelIndex &parent = QModelIndex()) const override
{
return parent.isValid() ? 0 : gameList.size();
}
int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const
int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const override
{
return NUM_COLS;
}
QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
static const QString getGameCreatedString(const int secs);
const ServerInfo_Game &getGame(int row);
@ -88,7 +88,7 @@ private:
showOnlyIfSpectatorsCanSeeHands;
public:
GamesProxyModel(QObject *parent = nullptr, const UserListProxy *_userListProxy = nullptr);
explicit GamesProxyModel(QObject *parent = nullptr, const UserListProxy *_userListProxy = nullptr);
bool getShowBuddiesOnlyGames() const
{
@ -173,7 +173,7 @@ public:
void refresh();
protected:
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
bool filterAcceptsRow(int sourceRow) const;
};