MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / WizAutoTimeOutEventLoop

Method WizAutoTimeOutEventLoop

src/share/WizEventLoop.cpp:8–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6const int NETWORK_TIMEOUT_SECS = 60;
7
8WizAutoTimeOutEventLoop::WizAutoTimeOutEventLoop(QNetworkReply* pReply, QObject *parent /*= 0*/)
9 : QEventLoop(parent)
10 , m_error(QNetworkReply::NoError)
11 , m_timeOut(false)
12 , m_timeOutSeconds(NETWORK_TIMEOUT_SECS)
13 , m_downloadBytes(0)
14 , m_lastDownloadBytes(0)
15 , m_uploadBytes(0)
16 , m_lastUploadBytes(0)
17 , m_reply(pReply)
18 , m_finished(false)
19{
20 m_url = pReply->request().url();
21 connect(pReply, SIGNAL(finished()), SLOT(on_replyFinished()));
22 connect(pReply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(on_replyError(QNetworkReply::NetworkError)));
23 connect(pReply, SIGNAL(downloadProgress(qint64,qint64)), SLOT(on_downloadProgress(qint64,qint64)));
24 connect(pReply, SIGNAL(uploadProgress(qint64,qint64)), SLOT(on_uploadProgress(qint64,qint64)));
25 connect(&m_timer, SIGNAL(timeout()), SLOT(on_timeOut()));
26}
27
28WizAutoTimeOutEventLoop::~WizAutoTimeOutEventLoop()
29{

Callers

nothing calls this directly

Calls 2

connectFunction · 0.85
urlMethod · 0.80

Tested by

no test coverage detected