summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--examples/webchannel/chatserver-cpp/chatserver.cpp9
-rw-r--r--examples/webchannel/chatserver-cpp/main.cpp12
-rw-r--r--examples/webchannel/shared/websocketclientwrapper.cpp5
-rw-r--r--src/webchannel/doc/src/index.qdoc15
-rw-r--r--src/webchannel/qmetaobjectpublisher_p.h2
-rw-r--r--src/webchannel/qwebchannelabstracttransport.cpp2
7 files changed, 22 insertions, 25 deletions
diff --git a/.qmake.conf b/.qmake.conf
index b4f392a..a1a840c 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,4 +1,4 @@
load(qt_build_config)
CONFIG += qt_example_installs warning_clean
-MODULE_VERSION = 5.7.0
+MODULE_VERSION = 5.8.0
diff --git a/examples/webchannel/chatserver-cpp/chatserver.cpp b/examples/webchannel/chatserver-cpp/chatserver.cpp
index 9bc45ce..74da4c3 100644
--- a/examples/webchannel/chatserver-cpp/chatserver.cpp
+++ b/examples/webchannel/chatserver-cpp/chatserver.cpp
@@ -115,12 +115,14 @@ bool ChatServer::sendMessage(const QString& user, const QString& msg)
}
}
-void ChatServer::sendKeepAlive() {
+void ChatServer::sendKeepAlive()
+{
emit keepAlive();
m_keepAliveCheckTimer->start();
}
-void ChatServer::checkKeepAliveResponses() {
+void ChatServer::checkKeepAliveResponses()
+{
qDebug() << "Keep Alive Check" << m_stillAliveUsers;
m_userList = m_stillAliveUsers;
m_stillAliveUsers.clear();
@@ -128,7 +130,8 @@ void ChatServer::checkKeepAliveResponses() {
emit userListChanged();
}
-void ChatServer::keepAliveResponse(const QString& user) {
+void ChatServer::keepAliveResponse(const QString& user)
+{
m_stillAliveUsers.append(user);
}
diff --git a/examples/webchannel/chatserver-cpp/main.cpp b/examples/webchannel/chatserver-cpp/main.cpp
index 240518c..ea27e87 100644
--- a/examples/webchannel/chatserver-cpp/main.cpp
+++ b/examples/webchannel/chatserver-cpp/main.cpp
@@ -49,17 +49,13 @@
****************************************************************************/
#include "qwebchannel.h"
-
-#include <QCoreApplication>
-#include <QUrl>
-#include <QDebug>
-
-#include <QtWebSockets/QWebSocketServer>
+#include "chatserver.h"
#include "../shared/websocketclientwrapper.h"
#include "../shared/websockettransport.h"
-#include "chatserver.h"
+#include <QtWebSockets/QWebSocketServer>
+#include <QCoreApplication>
int main(int argc, char** argv)
{
@@ -82,7 +78,7 @@ int main(int argc, char** argv)
// setup the dialog and publish it to the QWebChannel
ChatServer* chatserver = new ChatServer(&app);
- channel.registerObject("chatserver", chatserver);
+ channel.registerObject(QStringLiteral("chatserver"), chatserver);
return app.exec();
}
diff --git a/examples/webchannel/shared/websocketclientwrapper.cpp b/examples/webchannel/shared/websocketclientwrapper.cpp
index 0778cee..3743bdd 100644
--- a/examples/webchannel/shared/websocketclientwrapper.cpp
+++ b/examples/webchannel/shared/websocketclientwrapper.cpp
@@ -49,13 +49,12 @@
****************************************************************************/
#include "websocketclientwrapper.h"
+#include "websockettransport.h"
#include <QtWebSockets/QWebSocketServer>
-#include "websockettransport.h"
-
/*!
- \brief Wrapps connected QWebSockets clients in WebSocketTransport objects.
+ \brief Wraps connected QWebSockets clients in WebSocketTransport objects.
This code is all that is required to connect incoming WebSockets to the WebChannel. Any kind
of remote JavaScript client that supports WebSockets can thus receive messages and access the
diff --git a/src/webchannel/doc/src/index.qdoc b/src/webchannel/doc/src/index.qdoc
index 5f354bd..a4eaad0 100644
--- a/src/webchannel/doc/src/index.qdoc
+++ b/src/webchannel/doc/src/index.qdoc
@@ -31,14 +31,13 @@
\title Qt WebChannel
\brief Bridges the gap between Qt applications and HTML/JavaScript.
- Qt WebChannel enables peer-to-peer communication between the host
- (QML/C++ application) and the client (HTML/JavaScript application). The
- transport mechanism is supported out of the box by the two popular web
- engines, Qt WebKit 2 and Qt WebEngine (experimental). It works on all
- browsers that support Qt WebSockets, enabling Qt WebChannel applications
- to run in any JavaScript runtime. Additionally, a custom transport
- mechanism can also be implemented using Qt WebSockets to support Qt
- WebChannel-based communication.
+ Qt WebChannel enables peer-to-peer communication between a host
+ (QML/C++ application) and a client (HTML/JavaScript application).
+ It is supported out of the box by Qt WebKit 2 and Qt WebEngine.
+ In addition it can work on all
+ browsers that support WebSockets, enabling Qt WebChannel clients
+ to run in any JavaScript environment (including QML). This requires
+ the implementation of a custom transport based on Qt WebSockets.
The module provides a JavaScript library for seamless integration of C++
and QML applications with HTML/JavaScript clients. The client must use the
diff --git a/src/webchannel/qmetaobjectpublisher_p.h b/src/webchannel/qmetaobjectpublisher_p.h
index f5109b6..c48fc84 100644
--- a/src/webchannel/qmetaobjectpublisher_p.h
+++ b/src/webchannel/qmetaobjectpublisher_p.h
@@ -94,7 +94,7 @@ public:
virtual ~QMetaObjectPublisher();
/**
- * Register @p object nuder the given @p id.
+ * Register @p object under the given @p id.
*
* The properties, signals and public methods of the QObject are
* published to the remote client, where an object with the given identifier
diff --git a/src/webchannel/qwebchannelabstracttransport.cpp b/src/webchannel/qwebchannelabstracttransport.cpp
index 414c9fe..d1b7199 100644
--- a/src/webchannel/qwebchannelabstracttransport.cpp
+++ b/src/webchannel/qwebchannelabstracttransport.cpp
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
Users of the QWebChannel must implement this interface and connect instances of it
to the QWebChannel server for every client that should be connected to the QWebChannel.
- The {Qt WebChannel Standalone Example}{Standalone Example} shows how this can be done
+ The \l {Qt WebChannel Standalone Example}{Standalone Example} shows how this can be done
using Qt WebSockets. Qt WebKit implements this interface internally and uses the native
WebKit IPC mechanism to transmit messages to HTML clients.