diff options
Diffstat (limited to 'src/network/access/qhttpnetworkconnection.cpp')
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 6ef124f..b111bec 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -129,30 +129,6 @@ int QHttpNetworkConnectionPrivate::indexOf(QAbstractSocket *socket) const return 0; } -bool QHttpNetworkConnectionPrivate::isSocketBusy(QAbstractSocket *socket) const -{ - int i = indexOf(socket); - return (channels[i].state & QHttpNetworkConnectionChannel::BusyState); -} - -bool QHttpNetworkConnectionPrivate::isSocketWriting(QAbstractSocket *socket) const -{ - int i = indexOf(socket); - return (i != -1 && (channels[i].state & QHttpNetworkConnectionChannel::WritingState)); -} - -bool QHttpNetworkConnectionPrivate::isSocketWaiting(QAbstractSocket *socket) const -{ - int i = indexOf(socket); - return (i != -1 && (channels[i].state & QHttpNetworkConnectionChannel::WaitingState)); -} - -bool QHttpNetworkConnectionPrivate::isSocketReading(QAbstractSocket *socket) const -{ - int i = indexOf(socket); - return (i != -1 && (channels[i].state & QHttpNetworkConnectionChannel::ReadingState)); -} - qint64 QHttpNetworkConnectionPrivate::uncompressedBytesAvailable(const QHttpNetworkReply &reply) const { return reply.d_func()->responseData.byteAmount(); @@ -627,7 +603,7 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply) for (int i = 0; i < channelCount; ++i) { if (channels[i].reply == reply) { channels[i].reply = 0; - if (reply->d_func()->connectionCloseEnabled()) + if (reply->d_func()->isConnectionCloseEnabled()) channels[i].close(); QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection); return; @@ -674,7 +650,7 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest() for (int i = 0; i < channelCount; ++i) { QAbstractSocket *chSocket = channels[i].socket; // send the request using the idle socket - if (!isSocketBusy(chSocket)) { + if (!channels[i].isSocketBusy()) { socket = chSocket; break; } |