summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2008-06-09 20:43:59 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2008-06-09 20:43:59 +0000
commitfb573630b8798eb743f27fab9ecc854055adb12a (patch)
tree5503c3659342690fef3181bd9cfeaa383b9dc447
parentbca9703b83a34d54b8ad7274834f9c0d556d856a (diff)
downloadrockbox-fb573630b8798eb743f27fab9ecc854055adb12a.tar.gz
rockbox-fb573630b8798eb743f27fab9ecc854055adb12a.zip
Simplify progress emit in httpget class a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17706 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--rbutil/rbutilqt/httpget.cpp9
-rw-r--r--rbutil/rbutilqt/httpget.h1
2 files changed, 2 insertions, 8 deletions
diff --git a/rbutil/rbutilqt/httpget.cpp b/rbutil/rbutilqt/httpget.cpp
index f4e2e04685..b349a2f4be 100644
--- a/rbutil/rbutilqt/httpget.cpp
+++ b/rbutil/rbutilqt/httpget.cpp
@@ -34,6 +34,7 @@ HttpGet::HttpGet(QObject *parent)
34 m_cached = false; 34 m_cached = false;
35 m_dumbCache = m_globalDumbCache; 35 m_dumbCache = m_globalDumbCache;
36 getRequest = -1; 36 getRequest = -1;
37 headRequest = -1;
37 // if a request is cancelled before a reponse is available return some 38 // if a request is cancelled before a reponse is available return some
38 // hint about this in the http response instead of nonsense. 39 // hint about this in the http response instead of nonsense.
39 m_response = -1; 40 m_response = -1;
@@ -49,7 +50,7 @@ HttpGet::HttpGet(QObject *parent)
49 m_serverTimestamp = QDateTime(); 50 m_serverTimestamp = QDateTime();
50 51
51 connect(&http, SIGNAL(done(bool)), this, SLOT(httpDone(bool))); 52 connect(&http, SIGNAL(done(bool)), this, SLOT(httpDone(bool)));
52 connect(&http, SIGNAL(dataReadProgress(int, int)), this, SLOT(httpProgress(int, int))); 53 connect(&http, SIGNAL(dataReadProgress(int, int)), this, SIGNAL(dataReadProgress(int, int)));
53 connect(&http, SIGNAL(requestFinished(int, bool)), this, SLOT(httpFinished(int, bool))); 54 connect(&http, SIGNAL(requestFinished(int, bool)), this, SLOT(httpFinished(int, bool)));
54 connect(&http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader&)), this, SLOT(httpResponseHeader(const QHttpResponseHeader&))); 55 connect(&http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader&)), this, SLOT(httpResponseHeader(const QHttpResponseHeader&)));
55 connect(&http, SIGNAL(stateChanged(int)), this, SLOT(httpState(int))); 56 connect(&http, SIGNAL(stateChanged(int)), this, SLOT(httpState(int)));
@@ -122,12 +123,6 @@ QHttp::Error HttpGet::error()
122} 123}
123 124
124 125
125void HttpGet::httpProgress(int read, int total)
126{
127 emit dataReadProgress(read, total);
128}
129
130
131void HttpGet::setProxy(const QUrl &proxy) 126void HttpGet::setProxy(const QUrl &proxy)
132{ 127{
133 qDebug() << "[HTTP]" << __func__ << "(QUrl)" << proxy.toString(); 128 qDebug() << "[HTTP]" << __func__ << "(QUrl)" << proxy.toString();
diff --git a/rbutil/rbutilqt/httpget.h b/rbutil/rbutilqt/httpget.h
index c8d7269fd6..0afd448bcd 100644
--- a/rbutil/rbutilqt/httpget.h
+++ b/rbutil/rbutilqt/httpget.h
@@ -67,7 +67,6 @@ class HttpGet : public QObject
67 67
68 private slots: 68 private slots:
69 void httpDone(bool error); 69 void httpDone(bool error);
70 void httpProgress(int, int);
71 void httpFinished(int, bool); 70 void httpFinished(int, bool);
72 void httpResponseHeader(const QHttpResponseHeader&); 71 void httpResponseHeader(const QHttpResponseHeader&);
73 void httpState(int); 72 void httpState(int);