summaryrefslogtreecommitdiff
path: root/src/cookiejar.cpp
diff options
context:
space:
mode:
authorLionel Chauvin <megabigbug@yahoo.fr>2009-08-05 22:47:31 +0200
committerLionel Chauvin <megabigbug@yahoo.fr>2009-08-05 22:47:31 +0200
commit4b38a882c26d23f22f603f8638c178b2bf4e183a (patch)
tree340663084cb34fc03692bfbfd651eba1f297bec4 /src/cookiejar.cpp
parentadd m_windowId else unable to connect to KCookieJarServer (diff)
downloadrekonq-4b38a882c26d23f22f603f8638c178b2bf4e183a.tar.xz
fix: clear cookies
Diffstat (limited to 'src/cookiejar.cpp')
-rw-r--r--src/cookiejar.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/cookiejar.cpp b/src/cookiejar.cpp
index 324fe827..e6409f3e 100644
--- a/src/cookiejar.cpp
+++ b/src/cookiejar.cpp
@@ -86,7 +86,6 @@ QList<QNetworkCookie> CookieJar::cookiesForUrl(const QUrl & url) const
}
-
bool CookieJar::setCookiesFromUrl(const QList<QNetworkCookie> & cookieList, const QUrl & url)
{
@@ -109,7 +108,20 @@ bool CookieJar::setCookiesFromUrl(const QList<QNetworkCookie> & cookieList, cons
return false;
}
+
void CookieJar::setWindowId(qlonglong id)
{
m_windowId=id;
}
+
+
+void CookieJar::clear()
+{
+ QDBusInterface kcookiejar("org.kde.kded", "/modules/kcookiejar", "org.kde.KCookieServer", QDBusConnection::sessionBus());
+ QDBusReply<void> reply = kcookiejar.call( "deleteAllCookies" );
+ if (!reply.isValid())
+ {
+ kWarning() << "Unable to delete all the cookies as requested.";
+ return;
+ }
+} \ No newline at end of file