summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorBenjamin C Meyer <benjamin.meyer@torchmobile.com>2009-03-20 19:11:06 (GMT)
committerPeter Hartmann <peter.hartmann@trolltech.com>2009-03-30 15:44:22 (GMT)
commitca7651e37599e0743ea37036dd3c7f891565fed8 (patch)
tree1b3232547ad7d3d5774f638a50a7c9c3694732ba /src/network
parent2cb93d0c1f80c572c5cfa5074a6cfae81a3b28d2 (diff)
downloadQt-ca7651e37599e0743ea37036dd3c7f891565fed8.zip
Qt-ca7651e37599e0743ea37036dd3c7f891565fed8.tar.gz
Qt-ca7651e37599e0743ea37036dd3c7f891565fed8.tar.bz2
When loading a url straight from cache call finished so the QNetworkReply::finished() signal is emited.
Signed-off-by: Thiago Macieira <thiago.macieira@nokia.com> Signed-off-by: Peter Hartmann <peter.hartmann@trolltech.com>
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 227a578..b09e9a6 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -527,8 +527,10 @@ void QNetworkAccessHttpBackend::postRequest()
foreach (const QByteArray &header, headers)
httpRequest.setHeaderField(header, request().rawHeader(header));
- if (loadedFromCache)
+ if (loadedFromCache) {
+ QNetworkAccessBackend::finished();
return; // no need to send the request! :)
+ }
httpReply = http->sendRequest(httpRequest);
httpReply->setParent(this);