Qt: Failed to retrieve update change list is not fatal

This commit is contained in:
Stenzek
2025-12-14 00:35:25 +10:00
parent f248c1cd74
commit 4c384842ce
2 changed files with 16 additions and 3 deletions

View File

@@ -454,6 +454,8 @@ void AutoUpdaterDialog::queueGetChanges()
void AutoUpdaterDialog::getChangesComplete(s32 status_code, const Error& error, std::vector<u8> response)
{
std::string_view error_message;
if (status_code == HTTPDownloader::HTTP_STATUS_OK)
{
QJsonParseError parse_error;
@@ -509,16 +511,23 @@ void AutoUpdaterDialog::getChangesComplete(s32 status_code, const Error& error,
}
m_ui.updateNotes->setText(changes_html);
return;
}
else
{
reportError("Change list JSON is not an object");
error_message = "Change list JSON is not an object";
}
}
else
{
reportError(fmt::format("Failed to download change list: {}", error.GetDescription()));
error_message = error.GetDescription();
}
m_ui.updateNotes->setText(QString::fromStdString(
fmt::format("<h2>Failed to download change list</h2><p>The error was:<pre>{}</pre></p><p>You may be able to "
"install this update anyway. If the download installation fails, you can download the update "
"from:</p><p><a href=\"" DOWNLOAD_PAGE_URL "\">" DOWNLOAD_PAGE_URL "</a></p>",
error_message, UPDATER_RELEASE_CHANNEL, UPDATER_RELEASE_CHANNEL)));
}
void AutoUpdaterDialog::downloadUpdateClicked()

View File

@@ -114,7 +114,11 @@
</layout>
</item>
<item>
<widget class="QTextBrowser" name="updateNotes"/>
<widget class="QTextBrowser" name="updateNotes">
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="actionButtons">