From 66b7f9eeea9fb988ce684d2737465911f47194c6 Mon Sep 17 00:00:00 2001 From: Kravickas Date: Sat, 28 Mar 2026 15:39:19 +0100 Subject: [PATCH 01/16] Enhance update dialog with changelog and links Added support for displaying changelog with clickable PR links in update dialog. --- rpcs3/rpcs3qt/update_manager.cpp | 114 ++++++++++++++++++++++++++----- 1 file changed, 96 insertions(+), 18 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index d32a1810b9..0a28c72f29 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -14,11 +14,17 @@ #include #include #include +#include +#include +#include #include +#include #include #include #include #include +#include +#include #include #if defined(_WIN32) || defined(__APPLE__) @@ -333,7 +339,7 @@ void update_manager::update(bool auto_accept) if (m_update_info.diff_msec < 0) { // This usually means that the current version was marked as broken and won't be shipped anymore, so we need to downgrade to avoid certain bugs. - update_message = tr("A better version of RPCS3 is available!

Current version: %0 (%1)
Better version: %2 (%3)
%4
Do you want to update?") + update_message = tr("A better version of RPCS3 is available!

Current version: %0 (%1)
Better version: %2 (%3)
%4") .arg(m_update_info.old_version) .arg(m_update_info.cur_date) .arg(m_update_info.new_version) @@ -342,7 +348,7 @@ void update_manager::update(bool auto_accept) } else { - update_message = tr("A new version of RPCS3 is available!

Current version: %0 (%1)
Latest version: %2 (%3)
Your version is %4 behind.
%5
Do you want to update?") + update_message = tr("A new version of RPCS3 is available!

Current version: %0 (%1)
Latest version: %2 (%3)
Your version is %4 behind.
%5") .arg(m_update_info.old_version) .arg(m_update_info.cur_date) .arg(m_update_info.new_version) @@ -353,43 +359,115 @@ void update_manager::update(bool auto_accept) } else { - update_message = tr("You're currently using a custom or PR build.

Latest version: %0 (%1)
The latest version is %2 old.
%3
Do you want to update to the latest official RPCS3 version?") + update_message = tr("You're currently using a custom or PR build.

Latest version: %0 (%1)
The latest version is %2 old.
%3") .arg(m_update_info.new_version) .arg(m_update_info.lts_date) .arg(localized.GetVerboseTimeByMs(std::abs(m_update_info.diff_msec), true)) .arg(support_message); } - QString changelog_content; + // Build HTML changelog with clickable PR links + // Technique adapted from shadPS4 Emulator Project (shadps4-qtlauncher) + // Original: Copyright 2024 shadPS4 Emulator Project, GPL-2.0-or-later + // Used here under GPL-2.0 (compatible with RPCS3's GPL-2.0-only) + QString changelog_html; for (const changelog_data& entry : m_update_info.changelog) { - if (!changelog_content.isEmpty()) - changelog_content.append('\n'); - changelog_content.append(tr("• %0: %1").arg(entry.version.isEmpty() ? tr("N/A") : entry.version, entry.title.isEmpty() ? tr("N/A") : entry.title)); + const QString version_str = entry.version.isEmpty() ? tr("N/A") : entry.version; + const QString title_str = entry.title.isEmpty() ? tr("N/A") : entry.title; + + if (!changelog_html.isEmpty()) + changelog_html += QStringLiteral("
"); + + changelog_html += QStringLiteral("  • ") + tr("%0: %1").arg(version_str, title_str); + } + + // Convert PR references like (#1234) into clickable GitHub links + if (!changelog_html.isEmpty()) + { + const QRegularExpression re(QStringLiteral("\\(\\#(\\d+)\\)")); + QString linked_changelog; + qsizetype last_index = 0; + QRegularExpressionMatchIterator it = re.globalMatch(changelog_html); + + while (it.hasNext()) + { + const QRegularExpressionMatch match = it.next(); + linked_changelog += changelog_html.mid(last_index, match.capturedStart() - last_index); + const QString pr_num = match.captured(1); + linked_changelog += QStringLiteral("(#%0)").arg(pr_num); + last_index = match.capturedEnd(); + } + + linked_changelog += changelog_html.mid(last_index); + changelog_html = linked_changelog; } QMessageBox mb(QMessageBox::Icon::Question, tr("Update Available"), update_message, QMessageBox::Yes | QMessageBox::No, m_downloader->get_progress_dialog() ? m_downloader->get_progress_dialog() : m_parent); mb.setTextFormat(Qt::RichText); mb.setCheckBox(new QCheckBox(tr("Don't show again for this version"))); - if (!changelog_content.isEmpty()) + // Rearrange the layout: checkbox, then changelog, then prompt, then buttons + if (QGridLayout* grid = qobject_cast(mb.layout())) { - mb.setInformativeText(tr("To see the changelog, please click \"Show Details\".")); - mb.setDetailedText(tr("Changelog:\n\n%0").arg(changelog_content)); + const int cols = grid->columnCount(); - // Smartass hack to make the unresizeable message box wide enough for the changelog - const int changelog_width = QLabel(changelog_content).sizeHint().width(); - if (QLabel(update_message).sizeHint().width() < changelog_width) + QDialogButtonBox* button_box = mb.findChild(); + + if (button_box) + grid->removeWidget(button_box); + + int row = grid->rowCount(); + + if (!changelog_html.isEmpty()) { - update_message += "  "; - while (QLabel(update_message).sizeHint().width() < changelog_width) + QTextBrowser* changelog_browser = new QTextBrowser(&mb); + changelog_browser->setOpenExternalLinks(true); + changelog_browser->setReadOnly(true); + changelog_browser->setFrameShape(QFrame::NoFrame); + changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html)); + + // DPI-aware sizing: use font metrics instead of hardcoded pixels + const QFontMetrics fm = changelog_browser->fontMetrics(); + const int browser_width = fm.horizontalAdvance(QStringLiteral("m")) * 60; + const int browser_height = fm.height() * 12; + changelog_browser->setFixedSize(browser_width, browser_height); + changelog_browser->setVisible(false); + + const QString show_text = tr("Show Changelog"); + const QString hide_text = tr("Hide Changelog"); + + QPushButton* toggle_btn = new QPushButton(show_text, &mb); + grid->addWidget(toggle_btn, row++, 0, 1, cols); + grid->addWidget(changelog_browser, row++, 0, 1, cols); + + QObject::connect(toggle_btn, &QPushButton::clicked, [changelog_browser, toggle_btn, &mb, show_text, hide_text, browser_width]() { - update_message += " "; - } + const bool becoming_visible = !changelog_browser->isVisible(); + changelog_browser->setVisible(becoming_visible); + toggle_btn->setText(becoming_visible ? hide_text : show_text); + + mb.setMinimumWidth(becoming_visible ? browser_width + 20 : 0); + mb.adjustSize(); + }); } - mb.setText(update_message); + // Horizontal separator before the prompt + QFrame* separator = new QFrame(&mb); + separator->setFrameShape(QFrame::HLine); + separator->setFrameShadow(QFrame::Sunken); + grid->addWidget(separator, row++, 0, 1, cols); + + // "Do you want to update?" label + const QString prompt_text = m_update_info.hash_found + ? tr("Do you want to update?") + : tr("Do you want to update to the latest official RPCS3 version?"); + QLabel* prompt_label = new QLabel(prompt_text, &mb); + grid->addWidget(prompt_label, row++, 0, 1, cols); + + if (button_box) + grid->addWidget(button_box, row, 0, 1, cols); } update_log.notice("Asking user for permission to update..."); From 81477e6c7dbae814e1440b63fc1e0a1b31f1d1a0 Mon Sep 17 00:00:00 2001 From: Kravickas Date: Sat, 28 Mar 2026 15:56:43 +0100 Subject: [PATCH 02/16] fixup --- rpcs3/rpcs3qt/update_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index 0a28c72f29..4e7f77038f 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -380,7 +380,7 @@ void update_manager::update(bool auto_accept) if (!changelog_html.isEmpty()) changelog_html += QStringLiteral("
"); - changelog_html += QStringLiteral("  • ") + tr("%0: %1").arg(version_str, title_str); + changelog_html += tr("  • %0: %1").arg(version_str, title_str); } // Convert PR references like (#1234) into clickable GitHub links From cd782cb4fed0c7d28b44541893876121d30b4f94 Mon Sep 17 00:00:00 2001 From: Kravickas Date: Sat, 28 Mar 2026 19:29:08 +0100 Subject: [PATCH 03/16] pr test --- rpcs3/rpcs3qt/update_manager.cpp | 66 +++++++++++++++++--------------- rpcs3/rpcs3qt/update_manager.h | 1 + 2 files changed, 36 insertions(+), 31 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index 4e7f77038f..cd2d9df875 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -67,11 +66,12 @@ void update_manager::check_for_updates(bool automatic, bool check_only, bool aut if (automatic) { // Don't check for updates on local builds - if (rpcs3::is_local_build()) - { - update_log.notice("Skipped automatic update check: this is a local build"); - return; - } + // TEST: commented out — revert before merging + // if (rpcs3::is_local_build()) + // { + // update_log.notice("Skipped automatic update check: this is a local build"); + // return; + // } #ifdef __linux__ // Don't check for updates on startup if RPCS3 is not running from an AppImage. if (!::getenv("APPIMAGE")) @@ -114,7 +114,8 @@ void update_manager::check_for_updates(bool automatic, bool check_only, bool aut const utils::OS_version os = utils::get_OS_version(); const std::string url = fmt::format("https://update.rpcs3.net/?api=v3&c=%s&os_type=%s&os_arch=%s&os_version=%i.%i.%i", - rpcs3::get_commit_and_hash().second, os.type, os.arch, os.version_major, os.version_minor, os.version_patch); + "9b6bc7c1", os.type, os.arch, os.version_major, os.version_minor, os.version_patch); + // TEST: hardcoded hash — revert to rpcs3::get_commit_and_hash().second before merging m_downloader->start(url, true, !automatic, true, tr("Checking For Updates"), true); } @@ -284,6 +285,13 @@ bool update_manager::handle_json(bool automatic, bool check_only, bool auto_acce update_log.notice("JSON changelog entry does not contain a title string."); } + if (QJsonValue pr = changelog_entry["pr"]; pr.isDouble()) + { + entry.pr = pr.toInt(); + } + + update_log.notice("Changelog entry: version='%s', title='%s', pr=%d", entry.version, entry.title, entry.pr); + m_update_info.changelog.push_back(std::move(entry)); } else @@ -302,6 +310,19 @@ bool update_manager::handle_json(bool automatic, bool check_only, bool auto_acce } } + // TEST: assign PR numbers to entries — remove before merging + { + static const int test_prs[] = {18459, 18103, 18419, 18456, 18395, 18453, 18302, 18445}; + const int test_count = static_cast(sizeof(test_prs) / sizeof(test_prs[0])); + for (int i = 0; i < static_cast(m_update_info.changelog.size()) && i < test_count; i++) + { + if (m_update_info.changelog[i].pr == 0) + { + m_update_info.changelog[i].pr = test_prs[i]; + } + } + } + if (check_only) { update_log.notice("Update postponed. Check only is active"); @@ -366,10 +387,7 @@ void update_manager::update(bool auto_accept) .arg(support_message); } - // Build HTML changelog with clickable PR links - // Technique adapted from shadPS4 Emulator Project (shadps4-qtlauncher) - // Original: Copyright 2024 shadPS4 Emulator Project, GPL-2.0-or-later - // Used here under GPL-2.0 (compatible with RPCS3's GPL-2.0-only) + // Build HTML changelog with clickable PR links when available QString changelog_html; for (const changelog_data& entry : m_update_info.changelog) @@ -380,28 +398,14 @@ void update_manager::update(bool auto_accept) if (!changelog_html.isEmpty()) changelog_html += QStringLiteral("
"); - changelog_html += tr("  • %0: %1").arg(version_str, title_str); - } - - // Convert PR references like (#1234) into clickable GitHub links - if (!changelog_html.isEmpty()) - { - const QRegularExpression re(QStringLiteral("\\(\\#(\\d+)\\)")); - QString linked_changelog; - qsizetype last_index = 0; - QRegularExpressionMatchIterator it = re.globalMatch(changelog_html); - - while (it.hasNext()) + if (entry.pr > 0) { - const QRegularExpressionMatch match = it.next(); - linked_changelog += changelog_html.mid(last_index, match.capturedStart() - last_index); - const QString pr_num = match.captured(1); - linked_changelog += QStringLiteral("(#%0)").arg(pr_num); - last_index = match.capturedEnd(); + changelog_html += tr("  • %0: %1 (#%2)").arg(version_str, title_str, QString::number(entry.pr)); + } + else + { + changelog_html += tr("  • %0: %1").arg(version_str, title_str); } - - linked_changelog += changelog_html.mid(last_index); - changelog_html = linked_changelog; } QMessageBox mb(QMessageBox::Icon::Question, tr("Update Available"), update_message, QMessageBox::Yes | QMessageBox::No, m_downloader->get_progress_dialog() ? m_downloader->get_progress_dialog() : m_parent); diff --git a/rpcs3/rpcs3qt/update_manager.h b/rpcs3/rpcs3qt/update_manager.h index 98ef5cf3f1..d03d2c5a59 100644 --- a/rpcs3/rpcs3qt/update_manager.h +++ b/rpcs3/rpcs3qt/update_manager.h @@ -29,6 +29,7 @@ private: struct changelog_data { + int pr = 0; QString version; QString title; }; From 81ea30f28832419799913c5d427d70aafb203c9a Mon Sep 17 00:00:00 2001 From: Kravickas Date: Sat, 28 Mar 2026 21:21:36 +0100 Subject: [PATCH 04/16] ui --- rpcs3/rpcs3qt/update_manager.cpp | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index cd2d9df875..b2ae928bf2 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -417,6 +417,18 @@ void update_manager::update(bool auto_accept) { const int cols = grid->columnCount(); + // Center existing content above the changelog + for (int r = 0; r < grid->rowCount(); r++) + { + for (int c = 0; c < cols; c++) + { + if (QLayoutItem* item = grid->itemAtPosition(r, c)) + { + item->setAlignment(Qt::AlignHCenter); + } + } + } + QDialogButtonBox* button_box = mb.findChild(); if (button_box) @@ -432,11 +444,11 @@ void update_manager::update(bool auto_accept) changelog_browser->setFrameShape(QFrame::NoFrame); changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html)); - // DPI-aware sizing: use font metrics instead of hardcoded pixels + // DPI-aware sizing: use font metrics for height, let width fill the dialog const QFontMetrics fm = changelog_browser->fontMetrics(); - const int browser_width = fm.horizontalAdvance(QStringLiteral("m")) * 60; const int browser_height = fm.height() * 12; - changelog_browser->setFixedSize(browser_width, browser_height); + changelog_browser->setMinimumHeight(browser_height); + changelog_browser->setMaximumHeight(browser_height); changelog_browser->setVisible(false); const QString show_text = tr("Show Changelog"); @@ -446,13 +458,15 @@ void update_manager::update(bool auto_accept) grid->addWidget(toggle_btn, row++, 0, 1, cols); grid->addWidget(changelog_browser, row++, 0, 1, cols); - QObject::connect(toggle_btn, &QPushButton::clicked, [changelog_browser, toggle_btn, &mb, show_text, hide_text, browser_width]() + // Pre-size the dialog to fit the changelog width + const int browser_width = fm.horizontalAdvance(QStringLiteral("m")) * 55; + mb.setMinimumWidth(browser_width); + + QObject::connect(toggle_btn, &QPushButton::clicked, [changelog_browser, toggle_btn, &mb, show_text, hide_text]() { const bool becoming_visible = !changelog_browser->isVisible(); changelog_browser->setVisible(becoming_visible); toggle_btn->setText(becoming_visible ? hide_text : show_text); - - mb.setMinimumWidth(becoming_visible ? browser_width + 20 : 0); mb.adjustSize(); }); } From 6636d8eeddc2b67f7e16ad186ebb38b4d8c51ffa Mon Sep 17 00:00:00 2001 From: Kravickas Date: Sat, 28 Mar 2026 22:22:23 +0100 Subject: [PATCH 05/16] ui2 --- rpcs3/rpcs3qt/update_manager.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index b2ae928bf2..599ff15f5d 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -442,11 +442,15 @@ void update_manager::update(bool auto_accept) changelog_browser->setOpenExternalLinks(true); changelog_browser->setReadOnly(true); changelog_browser->setFrameShape(QFrame::NoFrame); + changelog_browser->setLineWrapMode(QTextBrowser::NoWrap); + changelog_browser->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html)); - // DPI-aware sizing: use font metrics for height, let width fill the dialog + // Size to fit content: width from document, height from font metrics + const int content_width = static_cast(changelog_browser->document()->idealWidth()) + 5; const QFontMetrics fm = changelog_browser->fontMetrics(); - const int browser_height = fm.height() * 12; + const int browser_height = fm.height() * 8; + changelog_browser->setMinimumWidth(content_width); changelog_browser->setMinimumHeight(browser_height); changelog_browser->setMaximumHeight(browser_height); changelog_browser->setVisible(false); @@ -458,9 +462,8 @@ void update_manager::update(bool auto_accept) grid->addWidget(toggle_btn, row++, 0, 1, cols); grid->addWidget(changelog_browser, row++, 0, 1, cols); - // Pre-size the dialog to fit the changelog width - const int browser_width = fm.horizontalAdvance(QStringLiteral("m")) * 55; - mb.setMinimumWidth(browser_width); + // Pre-size dialog to fit the widest changelog entry + mb.setMinimumWidth(content_width + 40); QObject::connect(toggle_btn, &QPushButton::clicked, [changelog_browser, toggle_btn, &mb, show_text, hide_text]() { From 6cff6f80b705325d706888f5b275028b483ff1db Mon Sep 17 00:00:00 2001 From: Kravickas Date: Sun, 29 Mar 2026 20:38:22 +0200 Subject: [PATCH 06/16] ui3 --- rpcs3/rpcs3qt/update_manager.cpp | 33 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index 599ff15f5d..940ae67c22 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -389,6 +389,7 @@ void update_manager::update(bool auto_accept) // Build HTML changelog with clickable PR links when available QString changelog_html; + QString longest_line; for (const changelog_data& entry : m_update_info.changelog) { @@ -398,13 +399,23 @@ void update_manager::update(bool auto_accept) if (!changelog_html.isEmpty()) changelog_html += QStringLiteral("
"); + // Build plain text version to measure width + QString plain_line; + if (entry.pr > 0) { changelog_html += tr("  • %0: %1 (#%2)").arg(version_str, title_str, QString::number(entry.pr)); + plain_line = tr(" • %0: %1 (#%2)").arg(version_str, title_str, QString::number(entry.pr)); } else { changelog_html += tr("  • %0: %1").arg(version_str, title_str); + plain_line = tr(" • %0: %1").arg(version_str, title_str); + } + + if (plain_line.length() > longest_line.length()) + { + longest_line = plain_line; } } @@ -417,18 +428,6 @@ void update_manager::update(bool auto_accept) { const int cols = grid->columnCount(); - // Center existing content above the changelog - for (int r = 0; r < grid->rowCount(); r++) - { - for (int c = 0; c < cols; c++) - { - if (QLayoutItem* item = grid->itemAtPosition(r, c)) - { - item->setAlignment(Qt::AlignHCenter); - } - } - } - QDialogButtonBox* button_box = mb.findChild(); if (button_box) @@ -446,10 +445,12 @@ void update_manager::update(bool auto_accept) changelog_browser->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html)); - // Size to fit content: width from document, height from font metrics - const int content_width = static_cast(changelog_browser->document()->idealWidth()) + 5; + // Measure the widest entry using font metrics for reliable pre-sizing const QFontMetrics fm = changelog_browser->fontMetrics(); - const int browser_height = fm.height() * 8; + const int content_width = fm.horizontalAdvance(longest_line) + 40; + const int entry_count = static_cast(m_update_info.changelog.size()); + const int visible_entries = entry_count > 6 ? 6 : entry_count; + const int browser_height = fm.height() * (visible_entries + 2); // +2 for "Changelog:" heading changelog_browser->setMinimumWidth(content_width); changelog_browser->setMinimumHeight(browser_height); changelog_browser->setMaximumHeight(browser_height); @@ -463,7 +464,7 @@ void update_manager::update(bool auto_accept) grid->addWidget(changelog_browser, row++, 0, 1, cols); // Pre-size dialog to fit the widest changelog entry - mb.setMinimumWidth(content_width + 40); + mb.setMinimumWidth(content_width + 60); QObject::connect(toggle_btn, &QPushButton::clicked, [changelog_browser, toggle_btn, &mb, show_text, hide_text]() { From caf9b9d4106c496729a82cd935c696f21723dcc4 Mon Sep 17 00:00:00 2001 From: Kravickas Date: Sun, 29 Mar 2026 21:44:47 +0200 Subject: [PATCH 07/16] ui4 --- rpcs3/rpcs3qt/update_manager.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index 940ae67c22..1c2997099a 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -463,9 +463,6 @@ void update_manager::update(bool auto_accept) grid->addWidget(toggle_btn, row++, 0, 1, cols); grid->addWidget(changelog_browser, row++, 0, 1, cols); - // Pre-size dialog to fit the widest changelog entry - mb.setMinimumWidth(content_width + 60); - QObject::connect(toggle_btn, &QPushButton::clicked, [changelog_browser, toggle_btn, &mb, show_text, hide_text]() { const bool becoming_visible = !changelog_browser->isVisible(); @@ -492,6 +489,14 @@ void update_manager::update(bool auto_accept) grid->addWidget(button_box, row, 0, 1, cols); } + // Force dialog width to fit the widest changelog entry before showing + if (!longest_line.isEmpty()) + { + const QFontMetrics fm = mb.fontMetrics(); + const int dialog_width = fm.horizontalAdvance(longest_line) + 100; + mb.setFixedWidth(dialog_width); + } + update_log.notice("Asking user for permission to update..."); if (mb.exec() == QMessageBox::No) From df88ef1a65f3234c3d91b47d9db20d4c3aaf39ef Mon Sep 17 00:00:00 2001 From: Kravickas Date: Sun, 29 Mar 2026 23:05:45 +0200 Subject: [PATCH 08/16] ui6 --- rpcs3/rpcs3qt/update_manager.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index 1c2997099a..01acdc6bc8 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -450,7 +450,7 @@ void update_manager::update(bool auto_accept) const int content_width = fm.horizontalAdvance(longest_line) + 40; const int entry_count = static_cast(m_update_info.changelog.size()); const int visible_entries = entry_count > 6 ? 6 : entry_count; - const int browser_height = fm.height() * (visible_entries + 2); // +2 for "Changelog:" heading + const int browser_height = fm.height() * (visible_entries + 4); // +4 for heading + spacing changelog_browser->setMinimumWidth(content_width); changelog_browser->setMinimumHeight(browser_height); changelog_browser->setMaximumHeight(browser_height); @@ -468,7 +468,11 @@ void update_manager::update(bool auto_accept) const bool becoming_visible = !changelog_browser->isVisible(); changelog_browser->setVisible(becoming_visible); toggle_btn->setText(becoming_visible ? hide_text : show_text); + + // Keep width locked, only adjust height + const int w = mb.width(); mb.adjustSize(); + mb.setFixedWidth(w); }); } @@ -489,12 +493,18 @@ void update_manager::update(bool auto_accept) grid->addWidget(button_box, row, 0, 1, cols); } - // Force dialog width to fit the widest changelog entry before showing - if (!longest_line.isEmpty()) + // Lock dialog width to expanded size before showing + if (QTextBrowser* browser = mb.findChild()) { - const QFontMetrics fm = mb.fontMetrics(); - const int dialog_width = fm.horizontalAdvance(longest_line) + 100; - mb.setFixedWidth(dialog_width); + // Temporarily show changelog to measure the full expanded width + browser->setVisible(true); + mb.adjustSize(); + const int expanded_width = mb.width(); + + // Collapse and lock width so it stays consistent + browser->setVisible(false); + mb.setFixedWidth(expanded_width); + mb.adjustSize(); } update_log.notice("Asking user for permission to update..."); From 88f466385a39035430905a1863b47afb1be97e56 Mon Sep 17 00:00:00 2001 From: Kravickas Date: Mon, 30 Mar 2026 00:45:13 +0200 Subject: [PATCH 09/16] ui7 --- rpcs3/rpcs3qt/update_manager.cpp | 36 +++++++++++++------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index 01acdc6bc8..8c90630837 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -389,7 +389,6 @@ void update_manager::update(bool auto_accept) // Build HTML changelog with clickable PR links when available QString changelog_html; - QString longest_line; for (const changelog_data& entry : m_update_info.changelog) { @@ -399,23 +398,13 @@ void update_manager::update(bool auto_accept) if (!changelog_html.isEmpty()) changelog_html += QStringLiteral("
"); - // Build plain text version to measure width - QString plain_line; - if (entry.pr > 0) { changelog_html += tr("  • %0: %1 (#%2)").arg(version_str, title_str, QString::number(entry.pr)); - plain_line = tr(" • %0: %1 (#%2)").arg(version_str, title_str, QString::number(entry.pr)); } else { changelog_html += tr("  • %0: %1").arg(version_str, title_str); - plain_line = tr(" • %0: %1").arg(version_str, title_str); - } - - if (plain_line.length() > longest_line.length()) - { - longest_line = plain_line; } } @@ -445,13 +434,21 @@ void update_manager::update(bool auto_accept) changelog_browser->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html)); - // Measure the widest entry using font metrics for reliable pre-sizing - const QFontMetrics fm = changelog_browser->fontMetrics(); - const int content_width = fm.horizontalAdvance(longest_line) + 40; + // Let Qt measure the actual rendered HTML content + const int doc_width = static_cast(changelog_browser->document()->idealWidth()) + 20; + const int doc_height = static_cast(changelog_browser->document()->size().height()) + 10; + + // For >6 entries, subtract the excess entry heights from the full document height const int entry_count = static_cast(m_update_info.changelog.size()); - const int visible_entries = entry_count > 6 ? 6 : entry_count; - const int browser_height = fm.height() * (visible_entries + 4); // +4 for heading + spacing - changelog_browser->setMinimumWidth(content_width); + int browser_height = doc_height; + + if (entry_count > 6) + { + const QFontMetrics fm = changelog_browser->fontMetrics(); + browser_height = doc_height - (entry_count - 6) * fm.lineSpacing(); + } + + changelog_browser->setMinimumWidth(doc_width); changelog_browser->setMinimumHeight(browser_height); changelog_browser->setMaximumHeight(browser_height); changelog_browser->setVisible(false); @@ -493,15 +490,12 @@ void update_manager::update(bool auto_accept) grid->addWidget(button_box, row, 0, 1, cols); } - // Lock dialog width to expanded size before showing + // Lock dialog width: temporarily expand to measure, then collapse if (QTextBrowser* browser = mb.findChild()) { - // Temporarily show changelog to measure the full expanded width browser->setVisible(true); mb.adjustSize(); const int expanded_width = mb.width(); - - // Collapse and lock width so it stays consistent browser->setVisible(false); mb.setFixedWidth(expanded_width); mb.adjustSize(); From bc77c0cb426c0074748b1d0122992a381367ee61 Mon Sep 17 00:00:00 2001 From: Kravickas Date: Mon, 30 Mar 2026 01:52:59 +0200 Subject: [PATCH 10/16] ui send help --- rpcs3/rpcs3qt/update_manager.cpp | 64 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index 8c90630837..01ab77ab37 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -389,23 +388,37 @@ void update_manager::update(bool auto_accept) // Build HTML changelog with clickable PR links when available QString changelog_html; + QString changelog_html_capped; // First 6 entries only, for height measurement + int changelog_count = 0; for (const changelog_data& entry : m_update_info.changelog) { const QString version_str = entry.version.isEmpty() ? tr("N/A") : entry.version; const QString title_str = entry.title.isEmpty() ? tr("N/A") : entry.title; - if (!changelog_html.isEmpty()) - changelog_html += QStringLiteral("
"); + QString entry_html; if (entry.pr > 0) { - changelog_html += tr("  • %0: %1 (#%2)").arg(version_str, title_str, QString::number(entry.pr)); + entry_html = tr("  • %0: %1 (#%2)").arg(version_str, title_str, QString::number(entry.pr)); } else { - changelog_html += tr("  • %0: %1").arg(version_str, title_str); + entry_html = tr("  • %0: %1").arg(version_str, title_str); } + + if (!changelog_html.isEmpty()) + changelog_html += QStringLiteral("
"); + changelog_html += entry_html; + + if (changelog_count < 6) + { + if (!changelog_html_capped.isEmpty()) + changelog_html_capped += QStringLiteral("
"); + changelog_html_capped += entry_html; + } + + changelog_count++; } QMessageBox mb(QMessageBox::Icon::Question, tr("Update Available"), update_message, QMessageBox::Yes | QMessageBox::No, m_downloader->get_progress_dialog() ? m_downloader->get_progress_dialog() : m_parent); @@ -434,23 +447,22 @@ void update_manager::update(bool auto_accept) changelog_browser->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html)); - // Let Qt measure the actual rendered HTML content - const int doc_width = static_cast(changelog_browser->document()->idealWidth()) + 20; - const int doc_height = static_cast(changelog_browser->document()->size().height()) + 10; + // Measure height for 6 entries directly + int browser_height; - // For >6 entries, subtract the excess entry heights from the full document height - const int entry_count = static_cast(m_update_info.changelog.size()); - int browser_height = doc_height; - - if (entry_count > 6) + if (changelog_count > 6) { - const QFontMetrics fm = changelog_browser->fontMetrics(); - browser_height = doc_height - (entry_count - 6) * fm.lineSpacing(); + // Temporarily render only 6 entries to get exact pixel height + changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html_capped)); + browser_height = static_cast(changelog_browser->document()->size().height()) + 10; + changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html)); + } + else + { + browser_height = static_cast(changelog_browser->document()->size().height()) + 10; } - changelog_browser->setMinimumWidth(doc_width); - changelog_browser->setMinimumHeight(browser_height); - changelog_browser->setMaximumHeight(browser_height); + changelog_browser->setFixedSize(500, browser_height); changelog_browser->setVisible(false); const QString show_text = tr("Show Changelog"); @@ -465,11 +477,7 @@ void update_manager::update(bool auto_accept) const bool becoming_visible = !changelog_browser->isVisible(); changelog_browser->setVisible(becoming_visible); toggle_btn->setText(becoming_visible ? hide_text : show_text); - - // Keep width locked, only adjust height - const int w = mb.width(); mb.adjustSize(); - mb.setFixedWidth(w); }); } @@ -486,21 +494,11 @@ void update_manager::update(bool auto_accept) QLabel* prompt_label = new QLabel(prompt_text, &mb); grid->addWidget(prompt_label, row++, 0, 1, cols); + // Re-add button box at the bottom if (button_box) grid->addWidget(button_box, row, 0, 1, cols); } - // Lock dialog width: temporarily expand to measure, then collapse - if (QTextBrowser* browser = mb.findChild()) - { - browser->setVisible(true); - mb.adjustSize(); - const int expanded_width = mb.width(); - browser->setVisible(false); - mb.setFixedWidth(expanded_width); - mb.adjustSize(); - } - update_log.notice("Asking user for permission to update..."); if (mb.exec() == QMessageBox::No) From 306edddf0835ab37ccd1e31f22fad7f2fffb8c2c Mon Sep 17 00:00:00 2001 From: Kravickas Date: Mon, 30 Mar 2026 02:51:34 +0200 Subject: [PATCH 11/16] ui9 Removed unnecessary addition of 10 to browser height calculation and added comments for clarity. --- rpcs3/rpcs3qt/update_manager.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index 01ab77ab37..6ad460d29d 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -447,19 +447,19 @@ void update_manager::update(bool auto_accept) changelog_browser->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html)); - // Measure height for 6 entries directly + // Measure height for 6 entries directly. int browser_height; if (changelog_count > 6) { // Temporarily render only 6 entries to get exact pixel height changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html_capped)); - browser_height = static_cast(changelog_browser->document()->size().height()) + 10; + browser_height = static_cast(changelog_browser->document()->size().height()); changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html)); } else { - browser_height = static_cast(changelog_browser->document()->size().height()) + 10; + browser_height = static_cast(changelog_browser->document()->size().height()); } changelog_browser->setFixedSize(500, browser_height); @@ -472,6 +472,9 @@ void update_manager::update(bool auto_accept) grid->addWidget(toggle_btn, row++, 0, 1, cols); grid->addWidget(changelog_browser, row++, 0, 1, cols); + // Pre-size dialog so it doesn't resize when toggling + mb.setMinimumWidth(540); + QObject::connect(toggle_btn, &QPushButton::clicked, [changelog_browser, toggle_btn, &mb, show_text, hide_text]() { const bool becoming_visible = !changelog_browser->isVisible(); From 0d088378c9525749081743081f0209d5167bfd2b Mon Sep 17 00:00:00 2001 From: Kravickas Date: Mon, 30 Mar 2026 03:52:39 +0200 Subject: [PATCH 12/16] ui10 --- rpcs3/rpcs3qt/update_manager.cpp | 51 +++++++++----------------------- 1 file changed, 14 insertions(+), 37 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index 6ad460d29d..cb5f086b74 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -388,37 +388,23 @@ void update_manager::update(bool auto_accept) // Build HTML changelog with clickable PR links when available QString changelog_html; - QString changelog_html_capped; // First 6 entries only, for height measurement - int changelog_count = 0; for (const changelog_data& entry : m_update_info.changelog) { const QString version_str = entry.version.isEmpty() ? tr("N/A") : entry.version; const QString title_str = entry.title.isEmpty() ? tr("N/A") : entry.title; - QString entry_html; + if (!changelog_html.isEmpty()) + changelog_html += QStringLiteral("
"); if (entry.pr > 0) { - entry_html = tr("  • %0: %1 (#%2)").arg(version_str, title_str, QString::number(entry.pr)); + changelog_html += tr("  • %0: %1 (#%2)").arg(version_str, title_str, QString::number(entry.pr)); } else { - entry_html = tr("  • %0: %1").arg(version_str, title_str); + changelog_html += tr("  • %0: %1").arg(version_str, title_str); } - - if (!changelog_html.isEmpty()) - changelog_html += QStringLiteral("
"); - changelog_html += entry_html; - - if (changelog_count < 6) - { - if (!changelog_html_capped.isEmpty()) - changelog_html_capped += QStringLiteral("
"); - changelog_html_capped += entry_html; - } - - changelog_count++; } QMessageBox mb(QMessageBox::Icon::Question, tr("Update Available"), update_message, QMessageBox::Yes | QMessageBox::No, m_downloader->get_progress_dialog() ? m_downloader->get_progress_dialog() : m_parent); @@ -445,24 +431,12 @@ void update_manager::update(bool auto_accept) changelog_browser->setFrameShape(QFrame::NoFrame); changelog_browser->setLineWrapMode(QTextBrowser::NoWrap); changelog_browser->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + changelog_browser->setFixedWidth(500); changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html)); - // Measure height for 6 entries directly. - int browser_height; - - if (changelog_count > 6) - { - // Temporarily render only 6 entries to get exact pixel height - changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html_capped)); - browser_height = static_cast(changelog_browser->document()->size().height()); - changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html)); - } - else - { - browser_height = static_cast(changelog_browser->document()->size().height()); - } - - changelog_browser->setFixedSize(500, browser_height); + // Use natural content height, cap at 200px to keep the dialog reasonable + const int doc_height = static_cast(changelog_browser->document()->size().height()); + changelog_browser->setFixedHeight(doc_height > 200 ? 200 : doc_height); changelog_browser->setVisible(false); const QString show_text = tr("Show Changelog"); @@ -472,9 +446,6 @@ void update_manager::update(bool auto_accept) grid->addWidget(toggle_btn, row++, 0, 1, cols); grid->addWidget(changelog_browser, row++, 0, 1, cols); - // Pre-size dialog so it doesn't resize when toggling - mb.setMinimumWidth(540); - QObject::connect(toggle_btn, &QPushButton::clicked, [changelog_browser, toggle_btn, &mb, show_text, hide_text]() { const bool becoming_visible = !changelog_browser->isVisible(); @@ -504,6 +475,12 @@ void update_manager::update(bool auto_accept) update_log.notice("Asking user for permission to update..."); + // Lock dialog width so it doesn't resize when toggling changelog + if (mb.findChild()) + { + mb.setFixedWidth(540); + } + if (mb.exec() == QMessageBox::No) { update_log.notice("Aborting update: User declined update"); From 09a7ee678c06934323a91c463e70246c381d75fb Mon Sep 17 00:00:00 2001 From: Kravickas Date: Mon, 30 Mar 2026 06:40:22 +0200 Subject: [PATCH 13/16] ui67 --- rpcs3/rpcs3qt/update_manager.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index cb5f086b74..98809931da 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -289,8 +289,6 @@ bool update_manager::handle_json(bool automatic, bool check_only, bool auto_acce entry.pr = pr.toInt(); } - update_log.notice("Changelog entry: version='%s', title='%s', pr=%d", entry.version, entry.title, entry.pr); - m_update_info.changelog.push_back(std::move(entry)); } else @@ -311,7 +309,7 @@ bool update_manager::handle_json(bool automatic, bool check_only, bool auto_acce // TEST: assign PR numbers to entries — remove before merging { - static const int test_prs[] = {18459, 18103, 18419, 18456, 18395, 18453, 18302, 18445}; + static const int test_prs[] = {18459, 18103, 18419, 18456}; const int test_count = static_cast(sizeof(test_prs) / sizeof(test_prs[0])); for (int i = 0; i < static_cast(m_update_info.changelog.size()) && i < test_count; i++) { @@ -473,14 +471,19 @@ void update_manager::update(bool auto_accept) grid->addWidget(button_box, row, 0, 1, cols); } - update_log.notice("Asking user for permission to update..."); - - // Lock dialog width so it doesn't resize when toggling changelog - if (mb.findChild()) + // Pad message text to match changelog width + if (!changelog_html.isEmpty()) { - mb.setFixedWidth(540); + const int target_width = 500; + while (QLabel(update_message).sizeHint().width() < target_width) + { + update_message += QStringLiteral(" "); + } + mb.setText(update_message); } + update_log.notice("Asking user for permission to update..."); + if (mb.exec() == QMessageBox::No) { update_log.notice("Aborting update: User declined update"); From b737ef832f71fbf4ec76675bbb36d46b85640882 Mon Sep 17 00:00:00 2001 From: Kravickas Date: Mon, 30 Mar 2026 14:45:17 +0200 Subject: [PATCH 14/16] last ui --- rpcs3/rpcs3qt/update_manager.cpp | 41 +++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index 98809931da..5bba4497d6 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -386,23 +386,37 @@ void update_manager::update(bool auto_accept) // Build HTML changelog with clickable PR links when available QString changelog_html; + QString changelog_html_6; // First 6 entries for height cap + int changelog_count = 0; for (const changelog_data& entry : m_update_info.changelog) { const QString version_str = entry.version.isEmpty() ? tr("N/A") : entry.version; const QString title_str = entry.title.isEmpty() ? tr("N/A") : entry.title; - if (!changelog_html.isEmpty()) - changelog_html += QStringLiteral("
"); + QString entry_html; if (entry.pr > 0) { - changelog_html += tr("  • %0: %1 (#%2)").arg(version_str, title_str, QString::number(entry.pr)); + entry_html = tr("  • %0: %1 (#%2)").arg(version_str, title_str, QString::number(entry.pr)); } else { - changelog_html += tr("  • %0: %1").arg(version_str, title_str); + entry_html = tr("  • %0: %1").arg(version_str, title_str); } + + if (!changelog_html.isEmpty()) + changelog_html += QStringLiteral("
"); + changelog_html += entry_html; + + if (changelog_count < 6) + { + if (!changelog_html_6.isEmpty()) + changelog_html_6 += QStringLiteral("
"); + changelog_html_6 += entry_html; + } + + changelog_count++; } QMessageBox mb(QMessageBox::Icon::Question, tr("Update Available"), update_message, QMessageBox::Yes | QMessageBox::No, m_downloader->get_progress_dialog() ? m_downloader->get_progress_dialog() : m_parent); @@ -429,12 +443,23 @@ void update_manager::update(bool auto_accept) changelog_browser->setFrameShape(QFrame::NoFrame); changelog_browser->setLineWrapMode(QTextBrowser::NoWrap); changelog_browser->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - changelog_browser->setFixedWidth(500); changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html)); - // Use natural content height, cap at 200px to keep the dialog reasonable - const int doc_height = static_cast(changelog_browser->document()->size().height()); - changelog_browser->setFixedHeight(doc_height > 200 ? 200 : doc_height); + // Natural height for ≤6 entries, capped at 6-entry height for more + int browser_height; + + if (changelog_count > 6) + { + changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html_6)); + browser_height = static_cast(changelog_browser->document()->size().height()); + changelog_browser->setHtml(QStringLiteral("

%0

%1").arg(tr("Changelog:"), changelog_html)); + } + else + { + browser_height = static_cast(changelog_browser->document()->size().height()); + } + + changelog_browser->setFixedHeight(browser_height); changelog_browser->setVisible(false); const QString show_text = tr("Show Changelog"); From f8b579866a51f9dd1117c199989084839b4fb137 Mon Sep 17 00:00:00 2001 From: Kravickas Date: Sat, 4 Apr 2026 15:14:46 +0200 Subject: [PATCH 15/16] clean up test code --- rpcs3/rpcs3qt/update_manager.cpp | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index 5482b8401e..d9a99876c1 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -64,12 +64,11 @@ void update_manager::check_for_updates(bool automatic, bool check_only, bool aut if (automatic) { // Don't check for updates on local builds - // TEST: commented out — revert before merging - // if (rpcs3::is_local_build()) - // { - // update_log.notice("Skipped automatic update check: this is a local build"); - // return; - // } + if (rpcs3::is_local_build()) + { + update_log.notice("Skipped automatic update check: this is a local build"); + return; + } #ifdef __linux__ // Don't check for updates on startup if RPCS3 is not running from an AppImage. if (!::getenv("APPIMAGE")) @@ -112,8 +111,7 @@ void update_manager::check_for_updates(bool automatic, bool check_only, bool aut const utils::OS_version os = utils::get_OS_version(); const std::string url = fmt::format("https://update.rpcs3.net/?api=v3&c=%s&os_type=%s&os_arch=%s&os_version=%i.%i.%i", - "9b6bc7c1", os.type, os.arch, os.version_major, os.version_minor, os.version_patch); - // TEST: hardcoded hash — revert to rpcs3::get_commit_and_hash().second before merging + rpcs3::get_commit_and_hash().second, os.type, os.arch, os.version_major, os.version_minor, os.version_patch); m_downloader->start(url, true, !automatic, true, tr("Checking For Updates"), true); } @@ -306,19 +304,6 @@ bool update_manager::handle_json(bool automatic, bool check_only, bool auto_acce } } - // TEST: assign PR numbers to entries — remove before merging - { - static const int test_prs[] = {18459, 18103, 18419, 18456}; - const int test_count = static_cast(sizeof(test_prs) / sizeof(test_prs[0])); - for (int i = 0; i < static_cast(m_update_info.changelog.size()) && i < test_count; i++) - { - if (m_update_info.changelog[i].pr == 0) - { - m_update_info.changelog[i].pr = test_prs[i]; - } - } - } - if (check_only) { update_log.notice("Update postponed. Check only is active"); From ca65d6f7134287b7f711a0316bdefc930f3eb26d Mon Sep 17 00:00:00 2001 From: Kravickas Date: Sat, 4 Apr 2026 16:34:11 +0200 Subject: [PATCH 16/16] cleanup --- rpcs3/rpcs3qt/update_manager.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index d9a99876c1..8f083b6c18 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -281,10 +281,7 @@ bool update_manager::handle_json(bool automatic, bool check_only, bool auto_acce update_log.notice("JSON changelog entry does not contain a title string."); } - if (QJsonValue pr = changelog_entry["pr"]; pr.isDouble()) - { - entry.pr = pr.toInt(); - } + entry.pr = changelog_entry["pr"].toInt(); m_update_info.changelog.push_back(std::move(entry)); }