Network chat: make ctors explicit

Task-number: QTBUG-108873
Change-Id: I08cd676aeb732d32b4d1e7d13a0aa1b37a46283f
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Mårten Nordheim 2023-05-16 13:18:43 +02:00
parent 3ece5e30b7
commit 61afc6d109
4 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ class ChatDialog : public QDialog, private Ui::ChatDialog
Q_OBJECT
public:
ChatDialog(QWidget *parent = nullptr);
explicit ChatDialog(QWidget *parent = nullptr);
public slots:
void appendMessage(const QString &from, const QString &message);

View File

@ -32,8 +32,8 @@ public:
Undefined
};
Connection(QObject *parent = nullptr);
Connection(qintptr socketDescriptor, QObject *parent = nullptr);
explicit Connection(QObject *parent = nullptr);
explicit Connection(qintptr socketDescriptor, QObject *parent = nullptr);
~Connection();
QString name() const;

View File

@ -18,7 +18,7 @@ class PeerManager : public QObject
Q_OBJECT
public:
PeerManager(Client *client);
explicit PeerManager(Client *client);
void setServerPort(int port);
QString userName() const;

View File

@ -13,7 +13,7 @@ class Server : public QTcpServer
Q_OBJECT
public:
Server(QObject *parent = nullptr);
explicit Server(QObject *parent = nullptr);
signals:
void newConnection(Connection *connection);