add missing override and explicit specifiers in src/server (#5526)

This commit is contained in:
RickyRister 2025-01-25 06:05:25 -08:00 committed by GitHub
parent a41e7c75c1
commit b911ea6e28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 58 additions and 56 deletions

View file

@ -39,7 +39,7 @@ private slots:
void enableTemporaryEdits(bool enabled);
public:
BanDialog(const ServerInfo_User &info, QWidget *parent = nullptr);
explicit BanDialog(const ServerInfo_User &info, QWidget *parent = nullptr);
QString getBanName() const;
QString getBanIP() const;
QString getBanId() const;
@ -90,9 +90,11 @@ public:
class UserListItemDelegate : public QStyledItemDelegate
{
public:
UserListItemDelegate(QObject *const parent);
bool
editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index);
explicit UserListItemDelegate(QObject *const parent);
bool editorEvent(QEvent *event,
QAbstractItemModel *model,
const QStyleOptionViewItem &option,
const QModelIndex &index) override;
};
class UserListTWI : public QTreeWidgetItem
@ -101,14 +103,14 @@ private:
ServerInfo_User userInfo;
public:
UserListTWI(const ServerInfo_User &_userInfo);
explicit UserListTWI(const ServerInfo_User &_userInfo);
const ServerInfo_User &getUserInfo() const
{
return userInfo;
}
void setUserInfo(const ServerInfo_User &_userInfo);
void setOnline(bool online);
bool operator<(const QTreeWidgetItem &other) const;
bool operator<(const QTreeWidgetItem &other) const override;
};
class UserListWidget : public QGroupBox