diff options
author | Benjamin C Meyer <ben@meyerhome.net> | 2009-09-01 07:51:53 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-09-01 08:31:54 (GMT) |
commit | 0e03e0d96c65250cf4b982b4dd2be55f948e65c9 (patch) | |
tree | bd92eb2a8fd29fd6bdf8242b5a248954e3b9947d /src/network | |
parent | 20cc50a21eb5841b3a3e8546877e805f5a4df528 (diff) | |
download | Qt-0e03e0d96c65250cf4b982b4dd2be55f948e65c9.zip Qt-0e03e0d96c65250cf4b982b4dd2be55f948e65c9.tar.gz Qt-0e03e0d96c65250cf4b982b4dd2be55f948e65c9.tar.bz2 |
Initialize QNetworkAccessBackend's private variables to 0 in the constructor
and when creating a CacheBackend set the manager pointer.
Merge-request: 1124
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'src/network')
-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) { } |