summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/httpget.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-03-22 08:50:55 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-03-22 08:50:55 +0000
commitba830e4cfe3429b502dc3b0bf4800664749a219a (patch)
treea6bf30d00dc394b5c717f5bac355a7fb687808de /rbutil/rbutilqt/base/httpget.cpp
parent5274dfd86aaaf1312485aff46cb2eb9caae9b8ea (diff)
downloadrockbox-ba830e4cfe3429b502dc3b0bf4800664749a219a.tar.gz
rockbox-ba830e4cfe3429b502dc3b0bf4800664749a219a.tar.bz2
rockbox-ba830e4cfe3429b502dc3b0bf4800664749a219a.zip
Don't connect the headerFinished slot during each get. Fixes the header result getting evaluated more than once if a HttpGet object is reused.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20447 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/base/httpget.cpp')
-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)
m_serverTimestamp = QDateTime();
connect(&http, SIGNAL(done(bool)), this, SLOT(httpDone(bool)));
- connect(&http, SIGNAL(dataReadProgress(int, int)), this, SIGNAL(dataReadProgress(int, int)));
- connect(&http, SIGNAL(requestFinished(int, bool)), this, SLOT(httpFinished(int, bool)));
- connect(&http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader&)), this, SLOT(httpResponseHeader(const QHttpResponseHeader&)));
+ connect(&http, SIGNAL(dataReadProgress(int, int)),
+ this, SIGNAL(dataReadProgress(int, int)));
+ connect(&http, SIGNAL(requestFinished(int, bool)),
+ this, SLOT(httpFinished(int, bool)));
+ connect(&http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader&)),
+ this, SLOT(httpResponseHeader(const QHttpResponseHeader&)));
// connect(&http, SIGNAL(stateChanged(int)), this, SLOT(httpState(int)));
connect(&http, SIGNAL(requestStarted(int)), this, SLOT(httpStarted(int)));
- connect(&http, SIGNAL(readyRead(const QHttpResponseHeader&)), this, SLOT(httpResponseHeader(const QHttpResponseHeader&)));
+ connect(&http, SIGNAL(readyRead(const QHttpResponseHeader&)),
+ this, SLOT(httpResponseHeader(const QHttpResponseHeader&)));
+ connect(this, SIGNAL(headerFinished()), this, SLOT(getFileFinish()));
}
@@ -210,7 +215,6 @@ bool HttpGet::getFile(const QUrl &url)
}
else {
// schedule HTTP header request
- connect(this, SIGNAL(headerFinished()), this, SLOT(getFileFinish()));
m_header.setRequest("HEAD", m_path + m_query);
headRequest = http.request(m_header);
qDebug() << "[HTTP] HEAD scheduled: " << headRequest;