Sha256: cca30d236e45ce58a577085649f64cf2613bcea46a70a4df3d93fb89c11cc7a5

Contents?: true

Size: 654 Bytes

Versions: 4

Compression:

Stored size: 654 Bytes

Contents

#include "SetProxy.h"
#include "WebPage.h"
#include <QNetworkAccessManager>
#include <QNetworkProxy>

SetProxy::SetProxy(WebPage *page, QStringList &arguments, QObject *parent) : Command(page, arguments, parent) {}

void SetProxy::start()
{
  // default to empty proxy
  QNetworkProxy proxy;

  if (arguments().size() > 0)
    proxy = QNetworkProxy(QNetworkProxy::HttpProxy,
                          arguments()[0],
                          (quint16)(arguments()[1].toInt()),
                          arguments()[2],
                          arguments()[3]);

  page()->networkAccessManager()->setProxy(proxy);
  emit finished(new Response(true));
}

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
imseng-capybara-webkit-0.12.1 src/SetProxy.cpp
capybara-webkit-0.12.1 src/SetProxy.cpp
otherinbox-capybara-webkit-0.12.0 src/SetProxy.cpp
capybara-webkit-0.12.0 src/SetProxy.cpp