Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (14 sloc) 0.628 kB
#include "SetCookie.h"
#include "WebPage.h"
#include "NetworkCookieJar.h"
#include <QNetworkCookie>
SetCookie::SetCookie(WebPage *page, QStringList &arguments, QObject *parent) : Command(page, arguments, parent) {}
void SetCookie::start()
{
QList<QNetworkCookie> cookies = QNetworkCookie::parseCookies(arguments()[0].toAscii());
NetworkCookieJar *jar = qobject_cast<NetworkCookieJar*>(page()
->networkAccessManager()
->cookieJar());
jar->overwriteCookies(cookies);
emit finished(new Response(true));
}
Jump to Line
Something went wrong with that request. Please try again.