diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2014-07-03 19:17:02 +0200 |
---|---|---|
committer | Milian Wolff <milian.wolff@kdab.com> | 2014-07-15 11:31:48 +0200 |
commit | 003596fad52690127afca0d7025b62bad7fd013e (patch) | |
tree | 7b68f95ce3a519018b309990f85bf7e044307fe9 /src/webchannel/qwebchannel.h | |
parent | 125c5f7dc270ab58e5f876cf8bc8aaf56d9e8f1b (diff) |
Make the QWebChannel QML API publically accessible.
This is required for proper QtWebKit/QtWebEngine integration, as
otherwise these modules would have to redo a lot of the QtWebChannel
QML API. Furthermore, without this, we could not use the WebChannel.id
attached property everywhere, independent of the web browser technology.
Change-Id: I032a9326841d505c2f77959a240bbfc71e94b6e8
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/webchannel/qwebchannel.h')
-rw-r--r-- | src/webchannel/qwebchannel.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/webchannel/qwebchannel.h b/src/webchannel/qwebchannel.h index 3e6f7a1..a4f34b4 100644 --- a/src/webchannel/qwebchannel.h +++ b/src/webchannel/qwebchannel.h @@ -90,20 +90,22 @@ public: */ void setBlockUpdates(bool block); - void connectTo(QWebChannelAbstractTransport *transport); - void disconnectFrom(QWebChannelAbstractTransport *transport); - Q_SIGNALS: void blockUpdatesChanged(bool block); public Q_SLOTS: + void connectTo(QWebChannelAbstractTransport *transport); + void disconnectFrom(QWebChannelAbstractTransport *transport); + void sendMessage(const QJsonValue &id, const QJsonValue &data = QJsonValue()) const; private: - QScopedPointer<QWebChannelPrivate> d; - Q_PRIVATE_SLOT(d, void _q_transportDestroyed(QObject*)); + Q_DECLARE_PRIVATE(QWebChannel) + QWebChannel(QWebChannelPrivate &dd, QObject *parent = 0); + Q_PRIVATE_SLOT(d_func(), void _q_transportDestroyed(QObject*)); + friend class QMetaObjectPublisher; - friend class QmlWebChannel; + friend class QQmlWebChannel; friend class TestWebChannel; }; |