Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 20 lines (15 sloc) 0.497 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include "SetTimeout.h"
#include "WebPageManager.h"

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

void SetTimeout::start() {
  QString timeoutString = arguments()[0];
  bool ok;
  int timeout = timeoutString.toInt(&ok);

  if (ok) {
    manager()->setTimeout(timeout);
    emit finished(new Response(true));
  } else {
    emit finished(new Response(false, QString("Invalid value for timeout")));
  }
}

Something went wrong with that request. Please try again.