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 Q_OBJECT
public: public:
ChatDialog(QWidget *parent = nullptr); explicit ChatDialog(QWidget *parent = nullptr);
public slots: public slots:
void appendMessage(const QString &from, const QString &message); void appendMessage(const QString &from, const QString &message);

View File

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

View File

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

View File

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