Change attribute of the download request to follow redirects. That makes the download feature of the Toolbox compatible with Qt 5.8.2.

This commit is contained in:
Diego Prado Gesto 2018-05-03 09:29:04 +02:00
parent 24684d5d9c
commit 65a6c751cd

View File

@ -300,7 +300,7 @@ class Toolbox(QObject, Extension):
Logger.log("i", "Toolbox: Attempting to download & install package from %s.", url)
url = QUrl(url)
self._download_request = QNetworkRequest(url)
self._download_request.setAttribute(QNetworkRequest.RedirectPolicyAttribute, QNetworkRequest.NoLessSafeRedirectPolicy)
self._download_request.setAttribute(QNetworkRequest.FollowRedirectsAttribute, True)
self._download_request.setRawHeader(*self._request_header)
self._download_reply = self._network_manager.get(self._download_request)
self.setDownloadProgress(0)