Esempio n. 1
0
NYBOT::NYBOT ()
{
  pluginName = "NYBOT";
  helpFile = "nybot.html";
  cancelFlag = FALSE;

  connect(this, SIGNAL(signalGetFileDone(bool)), this, SLOT(fileDone(bool)));
  connect(this, SIGNAL(signalTimeout()), this, SLOT(timeoutError()));

  buildGui();
  loadSettings();
  qInitNetworkProtocols();
  resize(400, 400);
}
Esempio n. 2
0
Yahoo::Yahoo ()
{
  pluginName = "Yahoo";
  helpFile = "yahoo.html";
  url.setAutoDelete(TRUE);
  currentUrl = 0;
  fileCount = 0;
  fileCounter = 0;

  config.getData(Config::DataPath, dataPath);
  dataPath.append("/Stocks/Yahoo");

  config.getData(Config::Home, file);
  file.append("/yahooDownload");

  q3InitNetworkProtocols();

  buildGui();

  loadSettings();

  connect(this, SIGNAL(signalGetFileDone(bool)), this, SLOT(fileDone(bool)));
  connect(this, SIGNAL(signalTimeout()), this, SLOT(timeoutError()));

  monthList.append("Jan");
  monthList.append("Feb");
  monthList.append("Mar");
  monthList.append("Apr");
  monthList.append("May");
  monthList.append("Jun");
  monthList.append("Jul");
  monthList.append("Aug");
  monthList.append("Sep");
  monthList.append("Oct");
  monthList.append("Nov");
  monthList.append("Dec");

  resize(640, 480);
}
Esempio n. 3
0
void QNetworkReplyHandler::timeout()
{
    if (!m_replyWrapper || wasAborted())
        return;

    // The request is already finished, but is probably just waiting in the queue to get processed.
    // In this case we ignore the timeout and proceed as normal.
    if (m_replyWrapper->isFinished())
        return;

    ResourceHandleClient* client = m_resourceHandle->client();
    if (!client) {
        m_replyWrapper.clear();
        return;
    }

    ASSERT(m_replyWrapper->reply());

    ResourceError timeoutError("QtNetwork", QNetworkReply::TimeoutError, m_replyWrapper->reply()->url().toString(), "Request timed out");
    timeoutError.setIsTimeout(true);
    client->didFail(m_resourceHandle, timeoutError);

    m_replyWrapper.clear();
}