summaryrefslogtreecommitdiff
path: root/src/network/access/qhttpnetworkconnectionchannel.cpp
diff options
context:
space:
mode:
authorPeter Hartmann <peter.hartmann@nokia.com>2010-11-26 10:19:37 +0100
committerPeter Hartmann <peter.hartmann@nokia.com>2010-11-26 10:20:46 +0100
commit320c682c3a76c3a59ebe102ba5aad3cd1eb4a13e (patch)
tree0f2f930a19eb3ff871ce01a96cbdebf46f99eba0 /src/network/access/qhttpnetworkconnectionchannel.cpp
parent6578492dd0badc03d2f1dcf094e426559f67308b (diff)
downloadqt4-tools-320c682c3a76c3a59ebe102ba5aad3cd1eb4a13e.tar.gz
Revert "Fix a missing error-signal when a server is shut down while downloading"
This reverts commit cbf7a7782f465846455a5fd5df339ebde31a5521. This commit caused autotest regressions in tst_qdeclarativeloader and tst_qdeclarativetext; reverting it for now until this has been resolved.
Diffstat (limited to 'src/network/access/qhttpnetworkconnectionchannel.cpp')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index a47e61904f..c8caad48f1 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -66,7 +66,6 @@ QHttpNetworkConnectionChannel::QHttpNetworkConnectionChannel()
, bytesTotal(0)
, resendCurrent(false)
, lastStatus(0)
- , unhandledError(QNetworkReply::NoError)
, pendingEncrypt(false)
, reconnectAttempts(2)
, authMethod(QAuthenticatorPrivate::None)
@@ -643,21 +642,7 @@ void QHttpNetworkConnectionChannel::allDone()
// slot connected to it. The socket will not fire readyRead signal, if we are already
// in the slot connected to readyRead
if (emitFinished)
- {
- // Check whether _q_error was invoked previously and if it left a socket
- // error unhandled.
- if(unhandledError != QNetworkReply::NoError) {
- QString errorString = connection->d_func()->errorDetail(unhandledError, socket, socket->errorString());
- qRegisterMetaType<QNetworkReply::NetworkError>("QNetworkReply::NetworkError");
- QMetaObject::invokeMethod(reply, "finishedWithError",
- Qt::QueuedConnection,
- Q_ARG(QNetworkReply::NetworkError, unhandledError),
- Q_ARG(QString, errorString));
- unhandledError = QNetworkReply::NoError; // Reset the value
- } else {
- QMetaObject::invokeMethod(reply, "finished", Qt::QueuedConnection);
- }
- }
+ QMetaObject::invokeMethod(reply, "finished", Qt::QueuedConnection);
// reset the reconnection attempts after we receive a complete reply.
// in case of failures, each channel will attempt two reconnects before emitting error.
reconnectAttempts = 2;
@@ -979,7 +964,6 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
errorCode = QNetworkReply::RemoteHostClosedError;
}
} else {
- unhandledError = QNetworkReply::RemoteHostClosedError;
return;
}
break;