mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-16 15:32:15 -07:00
add missing override and explicit specifiers in src/server (#5526)
This commit is contained in:
parent
a41e7c75c1
commit
b911ea6e28
8 changed files with 58 additions and 56 deletions
|
|
@ -23,10 +23,10 @@ public:
|
|||
QString name;
|
||||
|
||||
public:
|
||||
Node(const QString &_name, DirectoryNode *_parent = nullptr) : parent(_parent), name(_name)
|
||||
explicit Node(const QString &_name, DirectoryNode *_parent = nullptr) : parent(_parent), name(_name)
|
||||
{
|
||||
}
|
||||
virtual ~Node(){};
|
||||
virtual ~Node() = default;
|
||||
DirectoryNode *getParent() const
|
||||
{
|
||||
return parent;
|
||||
|
|
@ -39,8 +39,8 @@ public:
|
|||
class DirectoryNode : public Node, public QList<Node *>
|
||||
{
|
||||
public:
|
||||
DirectoryNode(const QString &_name = QString(), DirectoryNode *_parent = nullptr);
|
||||
~DirectoryNode();
|
||||
explicit DirectoryNode(const QString &_name = QString(), DirectoryNode *_parent = nullptr);
|
||||
~DirectoryNode() override;
|
||||
void clearTree();
|
||||
QString getPath() const;
|
||||
DirectoryNode *getNodeByPath(QStringList path);
|
||||
|
|
@ -87,15 +87,15 @@ private slots:
|
|||
void deckListFinished(const Response &r);
|
||||
|
||||
public:
|
||||
RemoteDeckList_TreeModel(AbstractClient *_client, QObject *parent = nullptr);
|
||||
~RemoteDeckList_TreeModel();
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const;
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
QModelIndex parent(const QModelIndex &index) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
explicit RemoteDeckList_TreeModel(AbstractClient *_client, QObject *parent = nullptr);
|
||||
~RemoteDeckList_TreeModel() override;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const 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 parent(const QModelIndex &index) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
|
||||
DirectoryNode *getRoot() const
|
||||
{
|
||||
|
|
@ -116,7 +116,7 @@ private:
|
|||
QSortFilterProxyModel *proxyModel;
|
||||
|
||||
public:
|
||||
RemoteDeckList_TreeWidget(AbstractClient *_client, QWidget *parent = nullptr);
|
||||
explicit RemoteDeckList_TreeWidget(AbstractClient *_client, QWidget *parent = nullptr);
|
||||
RemoteDeckList_TreeModel::Node *getNode(const QModelIndex &ind) const;
|
||||
RemoteDeckList_TreeModel::Node *getCurrentItem() const;
|
||||
QList<RemoteDeckList_TreeModel::Node *> getCurrentSelection() const;
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ private:
|
|||
QString name;
|
||||
|
||||
public:
|
||||
Node(const QString &_name) : name(_name)
|
||||
explicit Node(const QString &_name) : name(_name)
|
||||
{
|
||||
}
|
||||
virtual ~Node(){};
|
||||
virtual ~Node() = default;
|
||||
QString getName() const
|
||||
{
|
||||
return name;
|
||||
|
|
@ -39,8 +39,8 @@ private:
|
|||
ServerInfo_ReplayMatch matchInfo;
|
||||
|
||||
public:
|
||||
MatchNode(const ServerInfo_ReplayMatch &_matchInfo);
|
||||
~MatchNode();
|
||||
explicit MatchNode(const ServerInfo_ReplayMatch &_matchInfo);
|
||||
~MatchNode() override;
|
||||
void clearTree();
|
||||
const ServerInfo_ReplayMatch &getMatchInfo()
|
||||
{
|
||||
|
|
@ -82,18 +82,18 @@ private slots:
|
|||
void replayListFinished(const Response &r);
|
||||
|
||||
public:
|
||||
RemoteReplayList_TreeModel(AbstractClient *_client, QObject *parent = nullptr);
|
||||
~RemoteReplayList_TreeModel();
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const
|
||||
explicit RemoteReplayList_TreeModel(AbstractClient *_client, QObject *parent = nullptr);
|
||||
~RemoteReplayList_TreeModel() override;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const override
|
||||
{
|
||||
return numberOfColumns;
|
||||
}
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
QModelIndex parent(const QModelIndex &index) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
QVariant data(const QModelIndex &index, int role) const 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 parent(const QModelIndex &index) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
void clearTree();
|
||||
void refreshTree();
|
||||
ServerInfo_Replay const *getReplay(const QModelIndex &index) const;
|
||||
|
|
@ -111,7 +111,7 @@ private:
|
|||
QSortFilterProxyModel *proxyModel;
|
||||
|
||||
public:
|
||||
RemoteReplayList_TreeWidget(AbstractClient *_client, QWidget *parent = nullptr);
|
||||
explicit RemoteReplayList_TreeWidget(AbstractClient *_client, QWidget *parent = nullptr);
|
||||
ServerInfo_Replay const *getReplay(const QModelIndex &ind) const;
|
||||
ServerInfo_ReplayMatch const *getReplayMatch(const QModelIndex &ind) const;
|
||||
QList<ServerInfo_Replay const *> getSelectedReplays() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue