diff options
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/qnetworkaccessbackend.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp index ad9ec06..615ce7c 100644 --- a/src/network/access/qnetworkaccessbackend.cpp +++ b/src/network/access/qnetworkaccessbackend.cpp @@ -90,8 +90,11 @@ QNetworkAccessBackend *QNetworkAccessManagerPrivate::findBackend(QNetworkAccessM QNetworkRequest::PreferNetwork).toInt()); if (mode == QNetworkRequest::AlwaysCache && (op == QNetworkAccessManager::GetOperation - || op == QNetworkAccessManager::HeadOperation)) - return new QNetworkAccessCacheBackend; + || op == QNetworkAccessManager::HeadOperation)) { + QNetworkAccessBackend *backend = new QNetworkAccessCacheBackend; + backend->manager = this; + return backend; + } if (!factoryDataShutdown) { QMutexLocker locker(&factoryData()->mutex); @@ -110,6 +113,8 @@ QNetworkAccessBackend *QNetworkAccessManagerPrivate::findBackend(QNetworkAccessM } QNetworkAccessBackend::QNetworkAccessBackend() + : manager(0) + , reply(0) { } |