summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-02-04 22:46:42 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-02-04 22:46:42 (GMT)
commita4e3ee5296397c0111cc585696b0aca587509dbf (patch)
tree499dc5a42aa62395df3eb80fe368dabf19ad010d /tools
parentb83610a567c031f10d565a64edd4cb8b4d55a53a (diff)
downloadQt-a4e3ee5296397c0111cc585696b0aca587509dbf.zip
Qt-a4e3ee5296397c0111cc585696b0aca587509dbf.tar.gz
Qt-a4e3ee5296397c0111cc585696b0aca587509dbf.tar.bz2
Make sure cookies are saved.
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlviewer/qmlviewer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp
index 2b69d97..7aa3a40 100644
--- a/tools/qmlviewer/qmlviewer.cpp
+++ b/tools/qmlviewer/qmlviewer.cpp
@@ -344,12 +344,15 @@ class NetworkAccessManagerFactory : public QmlNetworkAccessManagerFactory
{
public:
NetworkAccessManagerFactory() : cookieJar(0), cacheSize(0) {}
+ ~NetworkAccessManagerFactory() {
+ delete cookieJar;
+ }
QNetworkAccessManager *create(QObject *parent) {
QMutexLocker lock(&mutex);
QNetworkAccessManager *manager = new QNetworkAccessManager(parent);
if (!cookieJar)
- cookieJar = new PersistentCookieJar(manager);
+ cookieJar = new PersistentCookieJar(0);
manager->setCookieJar(cookieJar);
cookieJar->setParent(0);
setupProxy(manager);