aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/webchannel/plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/webchannel/plugin.cpp')
-rw-r--r--src/imports/webchannel/plugin.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/imports/webchannel/plugin.cpp b/src/imports/webchannel/plugin.cpp
index 92aac79..589e3cb 100644
--- a/src/imports/webchannel/plugin.cpp
+++ b/src/imports/webchannel/plugin.cpp
@@ -43,6 +43,11 @@
#include <QtQml/QQmlExtensionPlugin>
#include "qmlwebchannel.h"
+#include "qwebsockettransport.h"
+#include "qmlwebviewtransport.h"
+#include "qwebchanneltransportinterface.h"
+
+QML_DECLARE_INTERFACE_HASMETATYPE(QWebChannelTransportInterface);
QT_BEGIN_NAMESPACE
@@ -57,10 +62,13 @@ 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