diff options
Diffstat (limited to 'src/imports/qmlwebsockets/qqmlwebsocket.h')
-rw-r--r-- | src/imports/qmlwebsockets/qqmlwebsocket.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/imports/qmlwebsockets/qqmlwebsocket.h b/src/imports/qmlwebsockets/qqmlwebsocket.h index 2e02f33..205f24d 100644 --- a/src/imports/qmlwebsockets/qqmlwebsocket.h +++ b/src/imports/qmlwebsockets/qqmlwebsocket.h @@ -64,6 +64,7 @@ class QQmlWebSocket : public QObject, public QQmlParserStatus public: explicit QQmlWebSocket(QObject *parent = Q_NULLPTR); + explicit QQmlWebSocket(QWebSocket *socket, QObject *parent = Q_NULLPTR); virtual ~QQmlWebSocket(); enum Status @@ -109,6 +110,8 @@ private: bool m_componentCompleted; QString m_errorString; + // takes ownership of the socket + void setSocket(QWebSocket *socket); void setStatus(Status status); void open(); void close(); |