diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-01-18 13:57:21 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-01-18 15:48:03 (GMT) |
commit | b5d3b999fa9c52246c8d4e4c1389df105d96cced (patch) | |
tree | 35edc2742f9a170237c7f266fdc89648264c1853 /src/network/access/qnetworkaccessmanager.cpp | |
parent | c4a842563d40e8b4c3693a8acb77c9aff6f06e29 (diff) | |
download | Qt-b5d3b999fa9c52246c8d4e4c1389df105d96cced.zip Qt-b5d3b999fa9c52246c8d4e4c1389df105d96cced.tar.gz Qt-b5d3b999fa9c52246c8d4e4c1389df105d96cced.tar.bz2 |
Enhance QFileNetworkReply
It is now considered as finished immediatly after creation to avoid
an event loop spin.
Had to change the auto tests a bit to account for the new behaviour.
Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network/access/qnetworkaccessmanager.cpp')
-rw-r--r-- | src/network/access/qnetworkaccessmanager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index d27fbe7..e16aedc 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -687,10 +687,10 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera // Also if the scheme is empty we consider it a file. // The QNetworkAccessFileBackend will right now only be used // for PUT or qrc:// - if (op == QNetworkAccessManager::GetOperation + if ((op == QNetworkAccessManager::GetOperation || op == QNetworkAccessManager::HeadOperation) && (req.url().scheme() == QLatin1String("file") || req.url().scheme().isEmpty())) { - return new QFileNetworkReply(this, req); + return new QFileNetworkReply(this, req, op); } QNetworkRequest request = req; |