From a4e3ee5296397c0111cc585696b0aca587509dbf Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 5 Feb 2010 08:46:42 +1000 Subject: Make sure cookies are saved. --- tools/qmlviewer/qmlviewer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- cgit v0.12