summaryrefslogtreecommitdiff
path: root/examples/websockets/simplechat/chatserver.h
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2017-09-25 16:16:58 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2017-09-28 13:21:27 +0000
commit71b5fc5dd10e9edce8db886f6c05b7950b3cca6e (patch)
treeff3b1a8543aae7abd3d1270eb7336c662bdf5c5c /examples/websockets/simplechat/chatserver.h
parentfdb6d8370f9ae8fa148124289317c108399853c3 (diff)
downloadqtwebsockets-71b5fc5dd10e9edce8db886f6c05b7950b3cca6e.tar.gz
Revamp WebSocket's simple-chat examplev5.10.0-beta1
- Replace Q_* macros with their 'modern' substitutes - Replace a usage of qDebug with QTextStream - Print a little piece of text whenever a client connects - Add a textbox to the html page to set the host to connect to - Enable/disable disconnect and send button based on connection Task-number: QTBUG-60656 Change-Id: Ieec571c3964f94cd464912054acda3208c02c898 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'examples/websockets/simplechat/chatserver.h')
-rw-r--r--examples/websockets/simplechat/chatserver.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/websockets/simplechat/chatserver.h b/examples/websockets/simplechat/chatserver.h
index 4c652a3..4a8285b 100644
--- a/examples/websockets/simplechat/chatserver.h
+++ b/examples/websockets/simplechat/chatserver.h
@@ -52,21 +52,21 @@
#include <QtCore/QObject>
#include <QtCore/QList>
-#include <QtCore/QByteArray>
QT_FORWARD_DECLARE_CLASS(QWebSocketServer)
QT_FORWARD_DECLARE_CLASS(QWebSocket)
+QT_FORWARD_DECLARE_CLASS(QString)
class ChatServer : public QObject
{
Q_OBJECT
public:
- explicit ChatServer(quint16 port, QObject *parent = Q_NULLPTR);
+ explicit ChatServer(quint16 port, QObject *parent = nullptr);
virtual ~ChatServer();
-private Q_SLOTS:
+private slots:
void onNewConnection();
- void processMessage(QString message);
+ void processMessage(const QString &message);
void socketDisconnected();
private: