summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-05-25 08:24:19 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-05-25 08:24:19 (GMT)
commit2814766c9e26159a1d45c50f1204f72d4f7bae91 (patch)
tree2219ed2e0b7fcd1013f438deda14d9ce571fea57 /src/network
parentffcbe13f0adc7ada8f04b74ed60660b033ee242f (diff)
parent55664a0ef4b88b67c9931c7d2f6853e5fa0a9716 (diff)
downloadQt-2814766c9e26159a1d45c50f1204f72d4f7bae91.zip
Qt-2814766c9e26159a1d45c50f1204f72d4f7bae91.tar.gz
Qt-2814766c9e26159a1d45c50f1204f72d4f7bae91.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 10fdc6f..fe36247 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -595,8 +595,9 @@ QNetworkCookieJar *QNetworkAccessManager::cookieJar() const
\note QNetworkAccessManager takes ownership of the \a cookieJar object.
- QNetworkAccessManager will set the parent of the \a cookieJar
- passed to itself, so that the cookie jar is deleted when this
+ If \a cookieJar is in the same thread as this QNetworkAccessManager,
+ it will set the parent of the \a cookieJar
+ so that the cookie jar is deleted when this
object is deleted as well. If you want to share cookie jars
between different QNetworkAccessManager objects, you may want to
set the cookie jar's parent to 0 after calling this function.
@@ -621,7 +622,8 @@ void QNetworkAccessManager::setCookieJar(QNetworkCookieJar *cookieJar)
if (d->cookieJar && d->cookieJar->parent() == this)
delete d->cookieJar;
d->cookieJar = cookieJar;
- d->cookieJar->setParent(this);
+ if (thread() == cookieJar->thread())
+ d->cookieJar->setParent(this);
}
}