diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-05 22:17:55 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-05 22:17:55 +0200 |
commit | b90cece697c11aa63bd686c72c7440c7dd857bd8 (patch) | |
tree | e05c5ce105f72cce11a1810dd0d0e1249ddc101f /src/cookiejar.cpp | |
parent | Restored the beautiful CTRL + L shortcut. (diff) | |
download | rekonq-b90cece697c11aa63bd686c72c7440c7dd857bd8.tar.xz |
Simplified CookieJar management
Diffstat (limited to 'src/cookiejar.cpp')
-rw-r--r-- | src/cookiejar.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/cookiejar.cpp b/src/cookiejar.cpp index 5160d6ed..cd7b97fa 100644 --- a/src/cookiejar.cpp +++ b/src/cookiejar.cpp @@ -32,6 +32,10 @@ // Auto Includes #include "rekonq.h" +// Local Includes +#include "application.h" +#include "mainwindow.h" + // KDE Includes #include <KConfig> #include <KStandardDirs> @@ -48,7 +52,6 @@ CookieJar::CookieJar(QObject* parent) : QNetworkCookieJar(parent) - , m_windowId(-1) , m_kcookiejar(new QDBusInterface("org.kde.kded", "/modules/kcookiejar", "org.kde.KCookieServer")) { } @@ -63,7 +66,7 @@ CookieJar::~CookieJar() QList<QNetworkCookie> CookieJar::cookiesForUrl(const QUrl & url) const { QList<QNetworkCookie> cookieList; - QDBusReply<QString> reply = m_kcookiejar->call("findCookies", url.toString() , m_windowId); + QDBusReply<QString> reply = m_kcookiejar->call("listCookies", url.toString() ); if (reply.isValid()) { @@ -85,20 +88,13 @@ bool CookieJar::setCookiesFromUrl(const QList<QNetworkCookie> & cookieList, cons { cookieHeader = "Set-Cookie: "; cookieHeader += cookie.toRawForm(); - m_kcookiejar->call("addCookies", url.toString(), cookieHeader, m_windowId); + m_kcookiejar->call("addCookies", url.toString(), cookieHeader, 0 ); } return !m_kcookiejar->lastError().isValid(); } -void CookieJar::setWindowId(qlonglong id) -{ - kDebug() << id; - m_windowId = id; -} - - void CookieJar::clear() { QDBusReply<void> reply = m_kcookiejar->call( "deleteAllCookies" ); |