diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2014-03-21 16:15:47 +0100 |
---|---|---|
committer | Pierre Rossi <pierre.rossi@gmail.com> | 2014-07-04 12:37:29 +0200 |
commit | 856dc072acb649be03e02ac64c81015d3f2675c2 (patch) | |
tree | 649985d553d6ea92360a66ca291af91c1114596e /src/imports/webchannel/plugin.cpp | |
parent | 9f78e0985d2f4fdc2588be57c5f25afdd59c6365 (diff) | |
download | qtwebchannel-856dc072acb649be03e02ac64c81015d3f2675c2.tar.gz |
Refactor code to use QWebChannelAbstractTransport and QtWebSockets.
This is a quite big changeset, but necessary to get the roadmap
implemented that was discussed at QtCS.
With this patchset landed, the QWebChannel does not depend on
QtWebKit anymore, not even for the tests. Rather, we will introduce
the dependency in the other way (i.e. QtWebKit will optionally use
QtWebChannel if available).
For the pure Qt/C++ use-case, we ship a utility implementation of
a QWebChannelAbstractTransport that uses a QWebSocket for the
server-client communication. This way, we can get rid of the custom
WebSocket implementation.
The tests are refactored to run the qwebchannel.js code directly
inside QML. Integration tests for QtWebKit/QtWebEngine as well
as examples will be added to these repositories.
Change-Id: Icc1c1c5918ec46e31d5070937c14c4ca25a3e2d6
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Diffstat (limited to 'src/imports/webchannel/plugin.cpp')
-rw-r--r-- | src/imports/webchannel/plugin.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/imports/webchannel/plugin.cpp b/src/imports/webchannel/plugin.cpp index 589e3cb..6507112 100644 --- a/src/imports/webchannel/plugin.cpp +++ b/src/imports/webchannel/plugin.cpp @@ -43,11 +43,6 @@ #include <QtQml/QQmlExtensionPlugin> #include "qmlwebchannel.h" -#include "qwebsockettransport.h" -#include "qmlwebviewtransport.h" -#include "qwebchanneltransportinterface.h" - -QML_DECLARE_INTERFACE_HASMETATYPE(QWebChannelTransportInterface); QT_BEGIN_NAMESPACE @@ -62,13 +57,9 @@ public: void QWebChannelPlugin::registerTypes(const char *uri) { - qmlRegisterInterface<QWebChannelTransportInterface>("QWebChannelTransportInterface"); - int major = 1; int minor = 0; qmlRegisterType<QmlWebChannel>(uri, major, minor, "WebChannel"); - qmlRegisterType<QWebSocketTransport>(uri, major, minor, "WebSocketTransport"); - qmlRegisterType<QmlWebViewTransport>(uri, major, minor, "WebViewTransport"); } QT_END_NAMESPACE |