diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-08 16:06:51 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-08 16:06:51 (GMT) |
commit | f6f2d03b2d74b236d33a5ca32a49f138bf521c13 (patch) | |
tree | f81b90ddc4f2b34bf0e9a56bbebbebb1dac9cc7d /src/network/bearer | |
parent | 7c8980ee041e874a6c430f01b2daff4955517b03 (diff) | |
parent | 75fd46451cabd680d16913d5dfd4733c09db3459 (diff) | |
download | Qt-f6f2d03b2d74b236d33a5ca32a49f138bf521c13.zip Qt-f6f2d03b2d74b236d33a5ca32a49f138bf521c13.tar.gz Qt-f6f2d03b2d74b236d33a5ca32a49f138bf521c13.tar.bz2 |
Merge branch 4.7 into qt-master-from-4.7
Diffstat (limited to 'src/network/bearer')
-rw-r--r-- | src/network/bearer/qnetworksession.cpp | 2 | ||||
-rw-r--r-- | src/network/bearer/qsharednetworksession.cpp | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp index 00ca65c..af60a43 100644 --- a/src/network/bearer/qnetworksession.cpp +++ b/src/network/bearer/qnetworksession.cpp @@ -260,7 +260,7 @@ QNetworkSession::QNetworkSession(const QNetworkConfiguration &connectionConfig, */ QNetworkSession::~QNetworkSession() { - d->deleteLater(); + delete d; } /*! diff --git a/src/network/bearer/qsharednetworksession.cpp b/src/network/bearer/qsharednetworksession.cpp index 28ca173..fcb0128 100644 --- a/src/network/bearer/qsharednetworksession.cpp +++ b/src/network/bearer/qsharednetworksession.cpp @@ -59,6 +59,11 @@ inline QSharedNetworkSessionManager* sharedNetworkSessionManager() return rv; } +static void doDeleteLater(QObject* obj) +{ + obj->deleteLater(); +} + QSharedPointer<QNetworkSession> QSharedNetworkSessionManager::getSession(QNetworkConfiguration config) { QSharedNetworkSessionManager *m(sharedNetworkSessionManager()); @@ -69,7 +74,7 @@ QSharedPointer<QNetworkSession> QSharedNetworkSessionManager::getSession(QNetwor return p; } //otherwise make one - QSharedPointer<QNetworkSession> session(new QNetworkSession(config)); + QSharedPointer<QNetworkSession> session(new QNetworkSession(config), doDeleteLater); m->sessions[config] = session; return session; } |