diff options
author | Markus Goetz <markus@woboq.com> | 2021-06-07 16:56:59 +0200 |
---|---|---|
committer | Markus Goetz <markus@woboq.com> | 2021-07-20 22:08:39 +0200 |
commit | e1b010ff47ae81067802d9240ea990d6d9187484 (patch) | |
tree | 612acc4acf7585aec439262326442b1a993ad168 /src/network/access/qhttpnetworkconnectionchannel.cpp | |
parent | 5e688a72046972b871347ff4d8dd141cdf9f2cef (diff) |
QNetworkReply: Add two new signals
These signals allow monitoring where in the HTTP1/HTTP2
flow a request is currently in.
Fixes: QTBUG-71698
Fixes: QTBUG-18766
Change-Id: Icc2fe435afc9f680fa7a76c32731e25fcdfeb4b4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/access/qhttpnetworkconnectionchannel.cpp')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 5d6495b5d3..458b729548 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -356,6 +356,13 @@ bool QHttpNetworkConnectionChannel::ensureConnection() QString connectHost = connection->d_func()->hostName; quint16 connectPort = connection->d_func()->port; + QHttpNetworkReply *potentialReply = connection->d_func()->predictNextRequestsReply(); + if (potentialReply) { + QMetaObject::invokeMethod(potentialReply, "socketConnecting", Qt::QueuedConnection); + } else if (h2RequestsToSend.count() > 0) { + QMetaObject::invokeMethod(h2RequestsToSend.values().at(0).second, "socketConnecting", Qt::QueuedConnection); + } + #ifndef QT_NO_NETWORKPROXY // HTTPS always use transparent proxy. if (connection->d_func()->networkProxy.type() != QNetworkProxy::NoProxy && !ssl) { |