QNAM HTTP: Fix missing error() signal
authorVille Pernu <ville.pernu@nokia.com>
Mon, 20 Dec 2010 07:57:24 +0000 (09:57 +0200)
committerVille Pernu <ville.pernu@nokia.com>
Mon, 20 Dec 2010 07:57:24 +0000 (09:57 +0200)
commitde72670c620e1193fa875bf1a4adee553700bacb
tree216c4e899548f674bc73faafd6686b6e858be0ba
parent58123db900c339a7df8fb7f8b24e210fbfb70182
QNAM HTTP: Fix missing error() signal

During download, if a QAbstractSocket::RemoteHostClosedError occurs, the error handling is deferred to _q_disconnected() slot. However, the error message is not saved for the function, and thus the _q_disconnected only emits a finished-signal.
We now store an unhandled error into a private member. It is handled and reset by the _q_disconnected (or more specifically, allDone-function). Also, an additional check is made that there are no simultaneous HTTP errors. If a HTTP error exists, any socket errors are suppressed.

Task-Number: QT-3494
Reviewed-By: Markus Goetz
src/network/access/qhttpnetworkconnectionchannel.cpp
src/network/access/qhttpnetworkconnectionchannel_p.h