diff options
-rw-r--r-- | src/cookiejar.cpp | 26 | ||||
-rw-r--r-- | src/cookiejar.h | 33 | ||||
-rw-r--r-- | src/networkaccessmanager.cpp | 6 | ||||
-rw-r--r-- | src/settings.cpp | 1 |
4 files changed, 39 insertions, 27 deletions
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 <adjam7 at gmail dot com> -* Copyright (C) 2009 by Domrachev Alexandr <alexandr.domrachev@gmail.com> +* Copyright (C) 2009 by Andrea Diamantini <adjam7 at gmail dot com> +* Copyright (C) 2009 by Lionel Chauvin <megabigbug@yahoo.fr> * * * This program is free software; you can redistribute it and/or @@ -46,15 +45,12 @@ #include <QtCore/QDateTime> #include <QtCore/QString> -#include <QtGui/QSortFilterProxyModel> -#include <QtGui/QCompleter> - -#include <QtDBus> +#include <QtDBus/QDBusInterface> +#include <QtDBus/QDBusReply> CookieJar::CookieJar(QObject* parent) - : QNetworkCookieJar(parent) - , m_windowId(-1) + : QNetworkCookieJar(parent) { } @@ -71,7 +67,7 @@ QList<QNetworkCookie> CookieJar::cookiesForUrl(const QUrl & url) const if ( true ) // FIXME WebKitSettings::self()->isCookieJarEnabled()) { QDBusInterface kcookiejar("org.kde.kded", "/modules/kcookiejar", "org.kde.KCookieServer"); - QDBusReply<QString> reply = kcookiejar.call("findCookies", url.toString(), m_windowId); + QDBusReply<QString> reply = kcookiejar.call("findCookies", url.toString() ); // , m_windowId); if (reply.isValid()) { @@ -100,7 +96,7 @@ bool CookieJar::setCookiesFromUrl(const QList<QNetworkCookie> & 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<QNetworkCookie> & 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 <adjam7 at gmail dot com> +* Copyright (C) 2009 by Lionel Chauvin <megabigbug@yahoo.fr> +* +* +* 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 <http://www.gnu.org/licenses/>. +* +* ============================================================ */ #ifndef RECOOKIEJAR_H #define RECOOKIEJAR_H - // Qt Includes #include <QtNetwork/QNetworkCookieJar> @@ -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<QNetworkCookie> cookiesForUrl(const QUrl & url) const; virtual bool setCookiesFromUrl(const QList<QNetworkCookie> & 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() |