summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rbutil/rbutilqt/base/httpget.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/rbutil/rbutilqt/base/httpget.cpp b/rbutil/rbutilqt/base/httpget.cpp
index 4db4ec384e..676bc64fee 100644
--- a/rbutil/rbutilqt/base/httpget.cpp
+++ b/rbutil/rbutilqt/base/httpget.cpp
@@ -51,13 +51,18 @@ HttpGet::HttpGet(QObject *parent)
51 m_serverTimestamp = QDateTime(); 51 m_serverTimestamp = QDateTime();
52 52
53 connect(&http, SIGNAL(done(bool)), this, SLOT(httpDone(bool))); 53 connect(&http, SIGNAL(done(bool)), this, SLOT(httpDone(bool)));
54 connect(&http, SIGNAL(dataReadProgress(int, int)), this, SIGNAL(dataReadProgress(int, int))); 54 connect(&http, SIGNAL(dataReadProgress(int, int)),
55 connect(&http, SIGNAL(requestFinished(int, bool)), this, SLOT(httpFinished(int, bool))); 55 this, SIGNAL(dataReadProgress(int, int)));
56 connect(&http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader&)), this, SLOT(httpResponseHeader(const QHttpResponseHeader&))); 56 connect(&http, SIGNAL(requestFinished(int, bool)),
57 this, SLOT(httpFinished(int, bool)));
58 connect(&http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader&)),
59 this, SLOT(httpResponseHeader(const QHttpResponseHeader&)));
57// connect(&http, SIGNAL(stateChanged(int)), this, SLOT(httpState(int))); 60// connect(&http, SIGNAL(stateChanged(int)), this, SLOT(httpState(int)));
58 connect(&http, SIGNAL(requestStarted(int)), this, SLOT(httpStarted(int))); 61 connect(&http, SIGNAL(requestStarted(int)), this, SLOT(httpStarted(int)));
59 62
60 connect(&http, SIGNAL(readyRead(const QHttpResponseHeader&)), this, SLOT(httpResponseHeader(const QHttpResponseHeader&))); 63 connect(&http, SIGNAL(readyRead(const QHttpResponseHeader&)),
64 this, SLOT(httpResponseHeader(const QHttpResponseHeader&)));
65 connect(this, SIGNAL(headerFinished()), this, SLOT(getFileFinish()));
61 66
62} 67}
63 68
@@ -210,7 +215,6 @@ bool HttpGet::getFile(const QUrl &url)
210 } 215 }
211 else { 216 else {
212 // schedule HTTP header request 217 // schedule HTTP header request
213 connect(this, SIGNAL(headerFinished()), this, SLOT(getFileFinish()));
214 m_header.setRequest("HEAD", m_path + m_query); 218 m_header.setRequest("HEAD", m_path + m_query);
215 headRequest = http.request(m_header); 219 headRequest = http.request(m_header);
216 qDebug() << "[HTTP] HEAD scheduled: " << headRequest; 220 qDebug() << "[HTTP] HEAD scheduled: " << headRequest;