|
|
|
@ -53,9 +53,6 @@ AutoUpdaterDialog::AutoUpdaterDialog(QtHostInterface* host_interface, QWidget* p
|
|
|
|
|
|
|
|
|
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
|
|
|
|
|
|
|
|
// m_ui.description->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
|
|
|
|
// m_ui.description->setOpenExternalLinks(true);
|
|
|
|
|
|
|
|
|
|
connect(m_ui.downloadAndInstall, &QPushButton::clicked, this, &AutoUpdaterDialog::downloadUpdateClicked);
|
|
|
|
|
connect(m_ui.skipThisUpdate, &QPushButton::clicked, this, &AutoUpdaterDialog::skipThisUpdateClicked);
|
|
|
|
|
connect(m_ui.remindMeLater, &QPushButton::clicked, this, &AutoUpdaterDialog::remindMeLaterClicked);
|
|
|
|
@ -197,6 +194,7 @@ void AutoUpdaterDialog::getLatestReleaseComplete(QNetworkReply* reply)
|
|
|
|
|
m_download_url = asset_obj["browser_download_url"].toString();
|
|
|
|
|
if (!m_download_url.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
m_download_size = asset_obj["size"].toInt();
|
|
|
|
|
m_ui.currentVersion->setText(tr("Current Version: %1 (%2)").arg(g_scm_hash_str).arg(g_scm_date_str));
|
|
|
|
|
m_ui.newVersion->setText(
|
|
|
|
|
tr("New Version: %1 (%2)").arg(m_latest_sha).arg(doc_object["published_at"].toString()));
|
|
|
|
@ -269,8 +267,10 @@ void AutoUpdaterDialog::getChangesComplete(QNetworkReply* reply)
|
|
|
|
|
if (first_line_terminator >= 0)
|
|
|
|
|
message.remove(first_line_terminator, message.size() - first_line_terminator);
|
|
|
|
|
if (!message.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
changes_html +=
|
|
|
|
|
QStringLiteral("<li>%1 <i>(%2)</i></li>").arg(message.toHtmlEscaped()).arg(author.toHtmlEscaped());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (message.contains(QStringLiteral("[SAVEVERSION+]")))
|
|
|
|
|
update_will_break_save_states = true;
|
|
|
|
@ -285,6 +285,9 @@ void AutoUpdaterDialog::getChangesComplete(QNetworkReply* reply)
|
|
|
|
|
"before installing this update or you will lose progress.</p>"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
changes_html += tr("<h4>Installing this update will download %1 MB through your internet connection.</h4>")
|
|
|
|
|
.arg(static_cast<double>(m_download_size) / 1000000.0, 0, 'f', 2);
|
|
|
|
|
|
|
|
|
|
m_ui.updateNotes->setText(changes_html);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|