summaryrefslogtreecommitdiffstats
path: root/examples/network/network-chat/client.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/network-chat/client.h')
-rw-r--r--examples/network/network-chat/client.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/network/network-chat/client.h b/examples/network/network-chat/client.h
index 5d55bf53d3..a09d0c21f6 100644
--- a/examples/network/network-chat/client.h
+++ b/examples/network/network-chat/client.h
@@ -4,12 +4,12 @@
#ifndef CLIENT_H
#define CLIENT_H
+#include "server.h"
+
#include <QAbstractSocket>
#include <QHash>
#include <QHostAddress>
-#include "server.h"
-
class PeerManager;
class Client : public QObject
@@ -21,7 +21,7 @@ public:
void sendMessage(const QString &message);
QString nickName() const;
- bool hasConnection(const QHostAddress &senderIp, int senderPort = -1) const;
+ bool hasConnection(const QByteArray &peerUniqueId) const;
signals:
void newMessage(const QString &from, const QString &message);
@@ -39,7 +39,7 @@ private:
PeerManager *peerManager;
Server server;
- QMultiHash<QHostAddress, Connection *> peers;
+ QHash<QByteArray, Connection *> peers;
};
#endif