Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (16 sloc) 0.521 kb
#include "Visit.h"
#include "Command.h"
#include "WebPage.h"
Visit::Visit(WebPage *page, QObject *parent) : Command(page, parent) {
connect(page, SIGNAL(pageFinished(bool)), this, SLOT(loadFinished(bool)));
}
void Visit::start(QStringList &arguments) {
QUrl requestedUrl = QUrl(arguments[0]);
page()->currentFrame()->load(QUrl(requestedUrl));
}
void Visit::loadFinished(bool success) {
QString message;
if (!success)
message = page()->failureString();
emit finished(new Response(success, message));
}
Jump to Line
Something went wrong with that request. Please try again.