QNAM - maintain a weak reference to the QNetworkSession
authorShane Kearns <ext-shane.2.kearns@nokia.com>
Thu, 31 May 2012 15:09:38 +0000 (16:09 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 1 Jun 2012 13:19:42 +0000 (15:19 +0200)
commitbae1613c4c3d8c38b90ed2ba5c1b149e1bc87987
treecb7d38a1a0cb1ca84e7558f374ff2bb29d68a1fa
parent3580168c3e357c2289acddc5f2515a3ad306ef2b
QNAM - maintain a weak reference to the QNetworkSession

When handling signals from the session, a pointer is needed.
Also the QNetworkReplyImpl needs to access the manager's session.
So, the manager should have a strong and weak reference.
The strong reference is held during connection establishment.
The weak reference is held all the time, though it will become
null when the session is destroyed in idle.
The non static member function getNetworkSession() is used to
create strong references from the weak reference where required.

Task-number: ou1cimx#1004278
Change-Id: I4b5b36b1d996b98e659d993969006c61b4440c15
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
src/network/access/qnetworkaccessbackend.cpp
src/network/access/qnetworkaccessmanager.cpp
src/network/access/qnetworkaccessmanager_p.h
src/network/access/qnetworkreplyhttpimpl.cpp
src/network/access/qnetworkreplyimpl.cpp