diff options
author | Kari Oikarinen <kari.oikarinen@qt.io> | 2019-01-08 08:19:26 +0200 |
---|---|---|
committer | Kari Oikarinen <kari.oikarinen@qt.io> | 2019-01-08 08:19:26 +0200 |
commit | 71fc43384f54b8b1625c22f119b88fb83670b210 (patch) | |
tree | 1cf12b6af3cea3a01667481f74d3aa56ab8cc7f0 | |
parent | 1ceac50cf3bf42b5e852a0fd94688601ab68013d (diff) | |
parent | e567b9d8c8447f8d2bd35ab3184b956e95380222 (diff) | |
download | qtwebsockets-71fc43384f54b8b1625c22f119b88fb83670b210.tar.gz |
Merge 5.12 into 5.12.1
Change-Id: I7618d577bf71922ae6d41de1cdbc63116f6aa457
-rw-r--r-- | .qmake.conf | 2 | ||||
-rw-r--r-- | dist/changes-5.11.3 | 20 | ||||
-rw-r--r-- | src/websockets/qwebsocket_p.h | 2 | ||||
-rw-r--r-- | src/websockets/qwebsocket_wasm_p.cpp | 4 |
4 files changed, 26 insertions, 2 deletions
diff --git a/.qmake.conf b/.qmake.conf index bc074d5..b9d358f 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -3,4 +3,4 @@ load(qt_build_config) CONFIG += warning_clean DEFINES += QT_NO_FOREACH -MODULE_VERSION = 5.12.0 +MODULE_VERSION = 5.12.1 diff --git a/dist/changes-5.11.3 b/dist/changes-5.11.3 new file mode 100644 index 0000000..f71fa34 --- /dev/null +++ b/dist/changes-5.11.3 @@ -0,0 +1,20 @@ +Qt 5.11.3 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.11.0 through 5.11.2. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.11 series is binary compatible with the 5.10.x series. +Applications compiled for 5.10 will continue to run with 5.11. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + + - This release contains only minor code improvements. diff --git a/src/websockets/qwebsocket_p.h b/src/websockets/qwebsocket_p.h index fd631d4..4b39dfc 100644 --- a/src/websockets/qwebsocket_p.h +++ b/src/websockets/qwebsocket_p.h @@ -158,6 +158,7 @@ public: void close(QWebSocketProtocol::CloseCode closeCode, QString reason); void open(const QNetworkRequest &request, bool mask); void ping(const QByteArray &payload); + void setSocketState(QAbstractSocket::SocketState state); private: QWebSocketPrivate(QTcpSocket *pTcpSocket, QWebSocketProtocol::Version version); @@ -168,7 +169,6 @@ private: void setProtocol(const QString &protocol); void setExtension(const QString &extension); void enableMasking(bool enable); - void setSocketState(QAbstractSocket::SocketState state); void setErrorString(const QString &errorString); void socketDestroyed(QObject *socket); diff --git a/src/websockets/qwebsocket_wasm_p.cpp b/src/websockets/qwebsocket_wasm_p.cpp index 2ac61ba..922d6a8 100644 --- a/src/websockets/qwebsocket_wasm_p.cpp +++ b/src/websockets/qwebsocket_wasm_p.cpp @@ -63,6 +63,7 @@ static void q_onCloseCallback(val event) QWebSocketPrivate *wsp = reinterpret_cast<QWebSocketPrivate*>(target["data-context"].as<quintptr>()); Q_ASSERT (wsp); + wsp->setSocketState(QAbstractSocket::UnconnectedState); emit wsp->q_func()->disconnected(); } @@ -73,6 +74,7 @@ static void q_onOpenCallback(val event) QWebSocketPrivate *wsp = reinterpret_cast<QWebSocketPrivate*>(target["data-context"].as<quintptr>()); Q_ASSERT (wsp); + wsp->setSocketState(QAbstractSocket::ConnectedState); emit wsp->q_func()->connected(); } @@ -149,6 +151,7 @@ void QWebSocketPrivate::close(QWebSocketProtocol::CloseCode closeCode, QString r m_closeCode = closeCode; m_closeReason = reason; Q_EMIT q->aboutToClose(); + setSocketState(QAbstractSocket::ClosingState); socketContext.call<void>("close", static_cast<quint16>(closeCode), reason.toLatin1().toStdString()); @@ -165,6 +168,7 @@ void QWebSocketPrivate::open(const QNetworkRequest &request, bool mask) return; } + setSocketState(QAbstractSocket::ConnectingState); const std::string urlbytes = url.toString().toStdString(); // HTML WebSockets do not support arbitrary request headers, but |