KIO::CookieJar

Search for usage in LXR

CookieJar Class Reference

#include <KIO/AccessManager>

Detailed Description

A KDE implementation of QNetworkCookieJar.

Use this class in place of QNetworkCookieJar if you want to integrate with KDE's cookiejar instead of the one that comes with Qt.

Here is a simple example that shows how to set the QtWebKit module to use KDE's cookiejar:

QWebView *view = new QWebView(this);
KIO::Integration::CookieJar *cookieJar = new KIO::Integration::CookieJar;
cookieJar->setWindowId(view->window()->winId());
view->page()->networkAccessManager()->setCookieJar(cookieJar);

To access member functions in the cookiejar class at a later point in your code simply downcast the pointer returned by QNetworkAccessManager::cookieJar as follows:

KIO::Integration::CookieJar *cookieJar = qobject_cast<KIO::Integration::CookieJar*>(view->page()->accessManager()->cookieJar());

IMPORTANTThis class is not a replacement for the standard KDE API. It should ONLY be used to provide KDE integration in applications that cannot use the standard KDE API directly.

See also
QNetworkAccessManager::setCookieJar for details.
Author
Dawit Alemayehu <adawit @ kde.org>
Since
4.4
Deprecated:
since 5.107, use QNetworkCookieJar

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Dec 8 2023 03:51:30 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.