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

View File

@ -81,6 +81,7 @@ void downloader::start(const std::string& url, bool follow_location, bool show_p
{
if (m_curl_abort)
{
network_log.notice("Download aborted");
return;
}
@ -92,6 +93,7 @@ void downloader::start(const std::string& url, bool follow_location, bool show_p
if (m_curl_success)
{
network_log.notice("Download finished");
Q_EMIT signal_download_finished(m_curl_buf);
}
});

View File

@ -218,7 +218,7 @@ bool main_window::Init([[maybe_unused]] bool with_cli_boot)
QMenu* download_menu = new QMenu(tr("Update Available!"));
QAction *download_action = new QAction(tr("Download Update"), download_menu);
QAction* download_action = new QAction(tr("Download Update"), download_menu);
connect(download_action, &QAction::triggered, this, [this]
{
m_updater.update(false);

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);
if (check_only)
{
m_downloader->close_progress_dialog();
return true;
}
if (!auto_accept)
{
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);
return true;
}