checkingFinished is now emitted in all cases.

This commit is contained in:
Mauro 2017-01-22 13:23:46 +01:00 committed by GitHub
parent c52b815c6a
commit a9b278cc6b

View File

@ -332,11 +332,16 @@ void Updater::onReply (QNetworkReply* reply)
/* There was a network error */ /* There was a network error */
if (reply->error() != QNetworkReply::NoError) if (reply->error() != QNetworkReply::NoError)
{
setUpdateAvailable(false);
emit checkingFinished (url());
return; return;
}
/* The application wants to interpret the appcast by itself */ /* The application wants to interpret the appcast by itself */
if (customAppcast()) { if (customAppcast()) {
emit appcastDownloaded (url(), reply->readAll()); emit appcastDownloaded (url(), reply->readAll());
emit checkingFinished (url());
return; return;
} }
@ -345,7 +350,11 @@ void Updater::onReply (QNetworkReply* reply)
/* JSON is invalid */ /* JSON is invalid */
if (document.isNull()) if (document.isNull())
{
setUpdateAvailable(false);
emit checkingFinished (url());
return; return;
}
/* Get the platform information */ /* Get the platform information */
QJsonObject updates = document.object().value ("updates").toObject(); QJsonObject updates = document.object().value ("updates").toObject();