diff options
Diffstat (limited to 'platform/qt/src/http_file_source.cpp')
-rw-r--r-- | platform/qt/src/http_file_source.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/qt/src/http_file_source.cpp b/platform/qt/src/http_file_source.cpp index 6e70693241..b95cfed0e9 100644 --- a/platform/qt/src/http_file_source.cpp +++ b/platform/qt/src/http_file_source.cpp @@ -29,6 +29,9 @@ void HTTPFileSource::Impl::request(HTTPRequest* req) } QNetworkRequest networkRequest = req->networkRequest(); +#if QT_VERSION >= 0x050600 + networkRequest.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); +#endif data.first = m_manager->get(networkRequest); connect(data.first, SIGNAL(finished()), this, SLOT(onReplyFinished())); @@ -72,7 +75,7 @@ void HTTPFileSource::Impl::cancel(HTTPRequest* req) void HTTPFileSource::Impl::onReplyFinished() { QNetworkReply* reply = qobject_cast<QNetworkReply *>(sender()); - const QUrl& url = reply->url(); + const QUrl& url = reply->request().url(); auto it = m_pending.find(url); if (it == m_pending.end()) { |