summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/cookiejar.cpp14
-rw-r--r--src/cookiejar.h2
-rw-r--r--src/mainwindow.cpp2
4 files changed, 16 insertions, 6 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index bc8ef53d..003b55bf 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -24,14 +24,10 @@ SET( rekonq_SRCS
lineedit.cpp
stackedurlbar.cpp
webpage.cpp
-# cookiedialog.cpp
-# cookieexceptiondialog.cpp
)
KDE4_ADD_UI_FILES( rekonq_SRCS
-# cookies.ui
-# cookiesexceptions.ui
password.ui
proxy.ui
settings_general.ui
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
diff --git a/src/cookiejar.h b/src/cookiejar.h
index e6e3f701..a1fe7d2d 100644
--- a/src/cookiejar.h
+++ b/src/cookiejar.h
@@ -46,6 +46,8 @@ public:
virtual QList<QNetworkCookie> cookiesForUrl(const QUrl & url) const;
virtual bool setCookiesFromUrl(const QList<QNetworkCookie> & cookieList, const QUrl & url);
+ void clear();
+
private:
qlonglong m_windowId;
};
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 7de20c6e..e27c75fe 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -972,7 +972,7 @@ void MainWindow::clearPrivateData()
if(clearWidget.clearCookies->isChecked())
{
- // FIXME (!) Application::cookieJar()->clear();
+ Application::cookieJar()->clear();
}
if(clearWidget.clearCachedPages->isChecked())