summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2017-08-28 12:57:24 +0200
committerKai Koehne <kai.koehne@qt.io>2017-09-06 11:35:13 +0000
commit7f992db892686fe4c260b0362d13b957af908692 (patch)
tree96d9526d04ccc42726a32096c27292ba95a61b30 /examples
parente7f150abaa8e81d3e404e9631a49341a7f7623d1 (diff)
downloadqtwebchannel-7f992db892686fe4c260b0362d13b957af908692.tar.gz
Examples: Use canonical include style and sort #include
See also https://wiki.qt.io/Writing_Qt_Examples Change-Id: Ife2300b9f1a074e9dc418d53f8c47138129b0cc7 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/webchannel/chatserver-cpp/chatserver.cpp4
-rw-r--r--examples/webchannel/chatserver-cpp/main.cpp4
-rw-r--r--examples/webchannel/shared/websocketclientwrapper.cpp2
-rw-r--r--examples/webchannel/shared/websockettransport.cpp5
-rw-r--r--examples/webchannel/shared/websockettransport.h2
-rw-r--r--examples/webchannel/standalone/main.cpp17
6 files changed, 15 insertions, 19 deletions
diff --git a/examples/webchannel/chatserver-cpp/chatserver.cpp b/examples/webchannel/chatserver-cpp/chatserver.cpp
index beee713..1025c80 100644
--- a/examples/webchannel/chatserver-cpp/chatserver.cpp
+++ b/examples/webchannel/chatserver-cpp/chatserver.cpp
@@ -50,9 +50,9 @@
#include "chatserver.h"
-#include <QtCore/QDebug>
-#include <QTimer>
+#include <QDebug>
#include <QTime>
+#include <QTimer>
ChatServer::ChatServer(QObject *parent)
: QObject(parent)
diff --git a/examples/webchannel/chatserver-cpp/main.cpp b/examples/webchannel/chatserver-cpp/main.cpp
index ea27e87..9e025ac 100644
--- a/examples/webchannel/chatserver-cpp/main.cpp
+++ b/examples/webchannel/chatserver-cpp/main.cpp
@@ -48,14 +48,14 @@
**
****************************************************************************/
-#include "qwebchannel.h"
#include "chatserver.h"
#include "../shared/websocketclientwrapper.h"
#include "../shared/websockettransport.h"
-#include <QtWebSockets/QWebSocketServer>
#include <QCoreApplication>
+#include <QWebChannel>
+#include <QWebSocketServer>
int main(int argc, char** argv)
{
diff --git a/examples/webchannel/shared/websocketclientwrapper.cpp b/examples/webchannel/shared/websocketclientwrapper.cpp
index a69e56a..16be85e 100644
--- a/examples/webchannel/shared/websocketclientwrapper.cpp
+++ b/examples/webchannel/shared/websocketclientwrapper.cpp
@@ -51,7 +51,7 @@
#include "websocketclientwrapper.h"
#include "websockettransport.h"
-#include <QtWebSockets/QWebSocketServer>
+#include <QWebSocketServer>
/*!
\brief Wraps connected QWebSockets clients in WebSocketTransport objects.
diff --git a/examples/webchannel/shared/websockettransport.cpp b/examples/webchannel/shared/websockettransport.cpp
index 4dbec39..e4ce50a 100644
--- a/examples/webchannel/shared/websockettransport.cpp
+++ b/examples/webchannel/shared/websockettransport.cpp
@@ -50,11 +50,10 @@
#include "websockettransport.h"
+#include <QDebug>
#include <QJsonDocument>
#include <QJsonObject>
-#include <QDebug>
-
-#include <QtWebSockets/QWebSocket>
+#include <QWebSocket>
/*!
\brief QWebChannelAbstractSocket implementation that uses a QWebSocket internally.
diff --git a/examples/webchannel/shared/websockettransport.h b/examples/webchannel/shared/websockettransport.h
index af645ab..252eaeb 100644
--- a/examples/webchannel/shared/websockettransport.h
+++ b/examples/webchannel/shared/websockettransport.h
@@ -51,7 +51,7 @@
#ifndef WEBSOCKETTRANSPORT_H
#define WEBSOCKETTRANSPORT_H
-#include <QtWebChannel/QWebChannelAbstractTransport>
+#include <QWebChannelAbstractTransport>
QT_BEGIN_NAMESPACE
class QWebSocket;
diff --git a/examples/webchannel/standalone/main.cpp b/examples/webchannel/standalone/main.cpp
index f468652..736ee52 100644
--- a/examples/webchannel/standalone/main.cpp
+++ b/examples/webchannel/standalone/main.cpp
@@ -48,21 +48,18 @@
**
****************************************************************************/
-#include "qwebchannel.h"
+#include "ui_dialog.h"
+#include "../shared/websocketclientwrapper.h"
+#include "../shared/websockettransport.h"
#include <QApplication>
-#include <QDialog>
-#include <QVariantMap>
#include <QDesktopServices>
-#include <QUrl>
+#include <QDialog>
#include <QDir>
#include <QFileInfo>
-#include <QtWebSockets/QWebSocketServer>
-
-#include "../shared/websocketclientwrapper.h"
-#include "../shared/websockettransport.h"
-
-#include "ui_dialog.h"
+#include <QUrl>
+#include <QWebChannel>
+#include <QWebSocketServer>
/*!
An instance of this class gets published over the WebChannel and is then accessible to HTML clients.