summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKurt Pattyn <pattyn.kurt@gmail.com>2013-11-02 10:53:25 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-02 10:59:40 +0100
commit491333701ef4cfe25a25007d2d88aa6361ed2304 (patch)
tree1552059d64368051da95d5b5395828f24ccc9315 /examples
parent77109b98b1789755e21aa7d4232b33750e59d007 (diff)
downloadqtwebsockets-491333701ef4cfe25a25007d2d88aa6361ed2304.tar.gz
Use QT namespace and forward declarations
Change-Id: I67a0ee96f2e21ed441bb10f55c6bf8180245846b Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/echoclient/echoclient.cpp2
-rw-r--r--examples/echoclient/echoclient.h2
-rw-r--r--examples/echoserver/echoserver.cpp2
-rw-r--r--examples/echoserver/echoserver.h4
4 files changed, 8 insertions, 2 deletions
diff --git a/examples/echoclient/echoclient.cpp b/examples/echoclient/echoclient.cpp
index 2fc9f73..e487ed6 100644
--- a/examples/echoclient/echoclient.cpp
+++ b/examples/echoclient/echoclient.cpp
@@ -41,6 +41,8 @@
#include "echoclient.h"
#include <QDebug>
+QT_USE_NAMESPACE
+
//! [constructor]
EchoClient::EchoClient(const QUrl &url, QObject *parent) :
QObject(parent),
diff --git a/examples/echoclient/echoclient.h b/examples/echoclient/echoclient.h
index 841f430..3bc1162 100644
--- a/examples/echoclient/echoclient.h
+++ b/examples/echoclient/echoclient.h
@@ -44,6 +44,8 @@
#include <QObject>
#include <QtWebSockets/QWebSocket>
+QT_FORWARD_DECLARE_CLASS(QWebSocket);
+
class EchoClient : public QObject
{
Q_OBJECT
diff --git a/examples/echoserver/echoserver.cpp b/examples/echoserver/echoserver.cpp
index f976762..78e99b9 100644
--- a/examples/echoserver/echoserver.cpp
+++ b/examples/echoserver/echoserver.cpp
@@ -43,6 +43,8 @@
#include "qwebsocket.h"
#include <QDebug>
+QT_USE_NAMESPACE
+
//! [constructor]
EchoServer::EchoServer(quint16 port, QObject *parent) :
QObject(parent),
diff --git a/examples/echoserver/echoserver.h b/examples/echoserver/echoserver.h
index e2a31a9..bbfa9e0 100644
--- a/examples/echoserver/echoserver.h
+++ b/examples/echoserver/echoserver.h
@@ -45,8 +45,8 @@
#include <QList>
#include <QByteArray>
-class QWebSocketServer;
-class QWebSocket;
+QT_FORWARD_DECLARE_CLASS(QWebSocketServer);
+QT_FORWARD_DECLARE_CLASS(QWebSocket);
class EchoServer : public QObject
{