Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 19 lines (15 sloc) 0.482 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include "Visit.h"
#include "Command.h"
#include "WebPage.h"

Visit::Visit(WebPage *page, QObject *parent) : Command(page, parent) {
  connect(page, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool)));
}

void Visit::start(QStringList &arguments) {
  page()->currentFrame()->setUrl(QUrl(arguments[0]));
}

void Visit::loadFinished(bool success) {
  QString message;
  if (!success)
    message = page()->failureString();

  emit finished(new Response(success, message));
}
Something went wrong with that request. Please try again.