summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2018-11-28 11:24:25 +0100
committerSimon Rettberg2018-11-28 11:24:25 +0100
commit24edd65489522576a4494dc1792fff80861c9b86 (patch)
tree625b7177b8ec22537f6a8adb3c516f656dd4c52e /src
parentRemove long description as toolTop (diff)
downloadvmchooser2-24edd65489522576a4494dc1792fff80861c9b86.tar.gz
vmchooser2-24edd65489522576a4494dc1792fff80861c9b86.tar.xz
vmchooser2-24edd65489522576a4494dc1792fff80861c9b86.zip
FileDownloader: Follow redirects
Diffstat (limited to 'src')
-rw-r--r--src/filedownloader.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/filedownloader.cpp b/src/filedownloader.cpp
index 4da3586..e0b0289 100644
--- a/src/filedownloader.cpp
+++ b/src/filedownloader.cpp
@@ -25,7 +25,9 @@ FileDownloader::~FileDownloader() {
bool FileDownloader::downloadFile() {
if (this->started)
return true;
- QNetworkReply *reply = m_WebCtrl.get(QNetworkRequest(this->url));
+ QNetworkRequest request(this->url);
+ request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
+ QNetworkReply *reply = m_WebCtrl.get(request);
if (reply == nullptr)
return false;
this->started = true;