summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2011-01-07 10:26:52 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2011-01-07 10:34:44 (GMT)
commitec46ec7d5d4783fb450ed75e2f6a2ae3edca918e (patch)
treeb1854f7500df500c362791fffd564fabc8f086de /src/network
parent37094502d4f3ada3b23adf4f6081f9b85d2be7c4 (diff)
downloadQt-ec46ec7d5d4783fb450ed75e2f6a2ae3edca918e.zip
Qt-ec46ec7d5d4783fb450ed75e2f6a2ae3edca918e.tar.gz
Qt-ec46ec7d5d4783fb450ed75e2f6a2ae3edca918e.tar.bz2
Revert "QNAM HTTP: Fix missing error() signal"
We don't think this is the right solution. This reverts commit de72670c620e1193fa875bf1a4adee553700bacb.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp20
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel_p.h1
2 files changed, 1 insertions, 20 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index c4471eb..c8caad4 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,23 +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 AND that there are no http errors.
- // In case there are both socket errors and http errors, the socket error is suppressed.
- // Http errors are handled in the QNetworkAccessHttpBackend.
- if(unhandledError != QNetworkReply::NoError && reply->statusCode() == 200) {
- 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));
- } else {
- QMetaObject::invokeMethod(reply, "finished", Qt::QueuedConnection);
- }
- unhandledError = QNetworkReply::NoError; // Reset the value
- }
+ 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;
@@ -981,7 +964,6 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
errorCode = QNetworkReply::RemoteHostClosedError;
}
} else {
- unhandledError = QNetworkReply::RemoteHostClosedError;
return;
}
break;
diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h
index e1d42fb..fd18042 100644
--- a/src/network/access/qhttpnetworkconnectionchannel_p.h
+++ b/src/network/access/qhttpnetworkconnectionchannel_p.h
@@ -105,7 +105,6 @@ public:
qint64 bytesTotal;
bool resendCurrent;
int lastStatus; // last status received on this channel
- QNetworkReply::NetworkError unhandledError; // Stored code of an unhandled error.
bool pendingEncrypt; // for https (send after encrypted)
int reconnectAttempts; // maximum 2 reconnection attempts
QAuthenticatorPrivate::Method authMethod;