fix updater from bintray api issue

This commit is contained in:
Zach H 2016-05-07 21:28:45 -04:00
parent ff1091ac02
commit d46cdd8044
4 changed files with 17 additions and 13 deletions

View file

@ -7,20 +7,15 @@ UpdateDownloader::UpdateDownloader(QObject *parent) : QObject(parent) {
}
void UpdateDownloader::beginDownload(QUrl downloadUrl) {
//Save the original URL because we need it for the filename
if (originalUrl.isEmpty())
originalUrl = downloadUrl;
response = netMan->get(QNetworkRequest(downloadUrl));
connect(response, SIGNAL(finished()),
this, SLOT(fileFinished()));
connect(response, SIGNAL(readyRead()),
this, SLOT(fileReadyRead()));
connect(response, SIGNAL(downloadProgress(qint64, qint64)),
this, SLOT(downloadProgress(qint64, qint64)));
connect(response, SIGNAL(error(QNetworkReply::NetworkError)),
this, SLOT(downloadError(QNetworkReply::NetworkError)));
connect(response, SIGNAL(finished()), this, SLOT(fileFinished()));
connect(response, SIGNAL(readyRead()), this, SLOT(fileReadyRead()));
connect(response, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(downloadProgress(qint64, qint64)));
connect(response, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(downloadError(QNetworkReply::NetworkError)));
}
void UpdateDownloader::downloadError(QNetworkReply::NetworkError) {