Qt: properly handle cancel of pkg install dialog
Some checks failed
Generate Translation Template / Generate Translation Template (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux-aarch64.sh, gcc, rpcs3/rpcs3-ci-jammy-aarch64:1.9, ubuntu-24.04-arm) (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.9, ubuntu-24.04) (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1, rpcs3/rpcs3-binaries-linux-arm64, /rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.9, ubuntu-24.04-arm) (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (d812f1254a1157c80fd402f94446310560f54e5f, rpcs3/rpcs3-binaries-linux, /rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.9, ubuntu-24.04) (push) Has been cancelled
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (0, 51ae32f468089a8169aaf1567de355ff4a3e0842, rpcs3/rpcs3-binaries-mac, Intel) (push) Has been cancelled
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (1, 8e21bdbc40711a3fccd18fbf17b742348b0f4281, rpcs3/rpcs3-binaries-mac-arm64, Apple Silicon) (push) Has been cancelled
Build RPCS3 / RPCS3 Windows (push) Has been cancelled
Build RPCS3 / RPCS3 Windows Clang ${{ matrix.arch }} (aarch64, clang, clangarm64, ARM64, windows-11-arm) (push) Has been cancelled
Build RPCS3 / RPCS3 Windows Clang ${{ matrix.arch }} (x86_64, clang, clang64, X64, windows-2025) (push) Has been cancelled
Build RPCS3 / RPCS3 FreeBSD (push) Has been cancelled

This commit is contained in:
Megamouse 2026-03-01 22:06:01 +01:00
parent 00a1c7278a
commit 9288565676

View file

@ -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))