From 928856567670d123b88b458f450bae0051deecb7 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sun, 1 Mar 2026 22:06:01 +0100 Subject: [PATCH] Qt: properly handle cancel of pkg install dialog --- rpcs3/rpcs3qt/main_window.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index 56e125ab11..687358d625 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -938,13 +938,20 @@ bool main_window::HandlePackageInstallation(QStringList file_paths, bool from_bo bool precompile_caches = false; bool create_desktop_shortcuts = false; bool create_app_shortcut = false; + bool canceled = false; game_compatibility* compat = m_game_list_frame ? m_game_list_frame->GetGameCompatibility() : nullptr; // Let the user choose the packages to install and select the order in which they shall be installed. pkg_install_dialog dlg(file_paths, compat, this); - connect(&dlg, &QDialog::accepted, this, [&]() + connect(&dlg, &QDialog::finished, this, [&](int result) { + if (result != QDialog::Accepted) + { + canceled = true; + return; + } + packages = dlg.get_paths_to_install(); precompile_caches = dlg.precompile_caches(); create_desktop_shortcuts = dlg.create_desktop_shortcuts(); @@ -952,6 +959,11 @@ bool main_window::HandlePackageInstallation(QStringList file_paths, bool from_bo }); dlg.exec(); + if (canceled) + { + return false; + } + if (!from_boot) { if (!m_gui_settings->GetBootConfirmation(this))