Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 15 lines (13 sloc) 0.503 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include "SetCookie.h"
#include "WebPage.h"
#include "WebPageManager.h"
#include "NetworkCookieJar.h"
#include <QNetworkCookie>

SetCookie::SetCookie(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) {}

void SetCookie::start()
{
  QList<QNetworkCookie> cookies = QNetworkCookie::parseCookies(arguments()[0].toAscii());
  NetworkCookieJar *jar = manager()->cookieJar();
  jar->overwriteCookies(cookies);
  emit finished(new Response(true));
}
Something went wrong with that request. Please try again.