Qt: Also parse changelog with "Background" update

This commit is contained in:
Megamouse
2022-06-12 09:00:30 +02:00
parent 0d022d420b
commit f3fa7119ac
3 changed files with 9 additions and 7 deletions
+2
View File
@@ -81,6 +81,7 @@ void downloader::start(const std::string& url, bool follow_location, bool show_p
{ {
if (m_curl_abort) if (m_curl_abort)
{ {
network_log.notice("Download aborted");
return; return;
} }
@@ -92,6 +93,7 @@ void downloader::start(const std::string& url, bool follow_location, bool show_p
if (m_curl_success) if (m_curl_success)
{ {
network_log.notice("Download finished");
Q_EMIT signal_download_finished(m_curl_buf); Q_EMIT signal_download_finished(m_curl_buf);
} }
}); });
+6 -6
View File
@@ -222,12 +222,6 @@ bool update_manager::handle_json(bool automatic, bool check_only, bool auto_acce
update_log.notice("Update found: %s", m_request_url); update_log.notice("Update found: %s", m_request_url);
if (check_only)
{
m_downloader->close_progress_dialog();
return true;
}
if (!auto_accept) if (!auto_accept)
{ {
const auto& changelog = json_data["changelog"]; const auto& changelog = json_data["changelog"];
@@ -278,6 +272,12 @@ bool update_manager::handle_json(bool automatic, bool check_only, bool auto_acce
} }
} }
if (check_only)
{
m_downloader->close_progress_dialog();
return true;
}
update(auto_accept); update(auto_accept);
return true; return true;
} }