summaryrefslogtreecommitdiff
path: root/src/cookiejar.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-09-05 22:17:55 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-09-05 22:17:55 +0200
commitb90cece697c11aa63bd686c72c7440c7dd857bd8 (patch)
treee05c5ce105f72cce11a1810dd0d0e1249ddc101f /src/cookiejar.cpp
parentRestored the beautiful CTRL + L shortcut. (diff)
downloadrekonq-b90cece697c11aa63bd686c72c7440c7dd857bd8.tar.xz
Simplified CookieJar management
Diffstat (limited to 'src/cookiejar.cpp')
-rw-r--r--src/cookiejar.cpp16
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" );