From 3c9d266d05d3721d2d8c57143c62f62b21fd7bbe Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 5 Aug 2009 17:50:56 +0200 Subject: Removing windowID settings, unuseful (for me) in a ONE window application :) --- src/cookiejar.cpp | 26 +++++++++++--------------- src/cookiejar.h | 33 +++++++++++++++++++++++++++------ src/networkaccessmanager.cpp | 6 ------ src/settings.cpp | 1 + 4 files changed, 39 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/cookiejar.cpp b/src/cookiejar.cpp index df3140f5..6aceaf6a 100644 --- a/src/cookiejar.cpp +++ b/src/cookiejar.cpp @@ -2,9 +2,8 @@ * * This file is a part of the rekonq project * -* Copyright (C) 2007-2008 Trolltech ASA. All rights reserved -* Copyright (C) 2008-2009 by Andrea Diamantini -* Copyright (C) 2009 by Domrachev Alexandr +* Copyright (C) 2009 by Andrea Diamantini +* Copyright (C) 2009 by Lionel Chauvin * * * This program is free software; you can redistribute it and/or @@ -46,15 +45,12 @@ #include #include -#include -#include - -#include +#include +#include CookieJar::CookieJar(QObject* parent) - : QNetworkCookieJar(parent) - , m_windowId(-1) + : QNetworkCookieJar(parent) { } @@ -71,7 +67,7 @@ QList CookieJar::cookiesForUrl(const QUrl & url) const if ( true ) // FIXME WebKitSettings::self()->isCookieJarEnabled()) { QDBusInterface kcookiejar("org.kde.kded", "/modules/kcookiejar", "org.kde.KCookieServer"); - QDBusReply reply = kcookiejar.call("findCookies", url.toString(), m_windowId); + QDBusReply reply = kcookiejar.call("findCookies", url.toString() ); // , m_windowId); if (reply.isValid()) { @@ -100,7 +96,7 @@ bool CookieJar::setCookiesFromUrl(const QList & cookieList, cons { cookieHeader = "Set-Cookie: "; cookieHeader += cookie.toRawForm(); - kcookiejar.call("addCookies", url.toString(), cookieHeader, m_windowId); + kcookiejar.call("addCookies", url.toString(), cookieHeader); //, m_windowId); //kDebug() << "url: " << url.host() << ", cookie: " << cookieHeader; } @@ -111,7 +107,7 @@ bool CookieJar::setCookiesFromUrl(const QList & cookieList, cons } -void CookieJar::setWindowId(qlonglong id) -{ - m_windowId = id; -} +// void CookieJar::setWindowId(qlonglong id) +// { +// m_windowId = id; +// } diff --git a/src/cookiejar.h b/src/cookiejar.h index d98d5af9..85e91fef 100644 --- a/src/cookiejar.h +++ b/src/cookiejar.h @@ -1,9 +1,33 @@ +/* ============================================================ +* +* This file is a part of the rekonq project +* +* Copyright (C) 2009 by Andrea Diamantini +* Copyright (C) 2009 by Lionel Chauvin +* +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License or (at your option) version 3 or any later version +* accepted by the membership of KDE e.V. (or its successor approved +* by the membership of KDE e.V.), which shall act as a proxy +* defined in Section 14 of version 3 of the license. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* ============================================================ */ #ifndef RECOOKIEJAR_H #define RECOOKIEJAR_H - // Qt Includes #include @@ -12,6 +36,8 @@ class QUrl; class CookieJar : public QNetworkCookieJar { + Q_OBJECT + public: CookieJar(QObject* parent = 0); virtual ~CookieJar(); @@ -19,11 +45,6 @@ public: virtual QList cookiesForUrl(const QUrl & url) const; virtual bool setCookiesFromUrl(const QList & cookieList, const QUrl & url); - - void setWindowId(qlonglong id); - -private: - qlonglong m_windowId; }; #endif // RECOOKIEJAR_H diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp index fa554838..49dc5aef 100644 --- a/src/networkaccessmanager.cpp +++ b/src/networkaccessmanager.cpp @@ -114,8 +114,6 @@ void NetworkAccessManager::resetDiskCache() else { QString location = m_diskCache->cacheDirectory(); -// setCache(0); -// delete m_diskCache; QDir cacheDir(location + QString("/http") ); QStringList fileList = cacheDir.entryList(); @@ -124,10 +122,6 @@ void NetworkAccessManager::resetDiskCache() QFile file(str); file.remove(); } - -// m_diskCache = new QNetworkDiskCache(this); -// m_diskCache->setCacheDirectory(location); -// setCache(m_diskCache); } } diff --git a/src/settings.cpp b/src/settings.cpp index 05180474..e0814e50 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -202,6 +202,7 @@ void SettingsDialog::saveSettings() d->cookiesModule->save(); } + bool SettingsDialog::hasChanged() { return KConfigDialog::hasChanged() -- cgit v1.2.1