From c3bc23a544b00480b6fdb9d09a01aaff38770f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Mon, 21 Sep 2026 18:59:56 +0200 Subject: [PATCH] [Client] Use QCoreApplication::exit() to leave on update QCoreApplication::quit() only asks the application to quit and can be interrupted if a top-level window refuses its close event. On the update path the process must actually leave so its Qt DLLs are unlocked before the installer starts replacing files - apply the exit(0) variant both on the accepted-close path and the fallback where no MainWindow was ever closed. --- cockatrice/src/interface/widgets/dialogs/dlg_update.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/interface/widgets/dialogs/dlg_update.cpp b/cockatrice/src/interface/widgets/dialogs/dlg_update.cpp index 2b6ef9194..060a30bc4 100644 --- a/cockatrice/src/interface/widgets/dialogs/dlg_update.cpp +++ b/cockatrice/src/interface/widgets/dialogs/dlg_update.cpp @@ -252,14 +252,14 @@ void DlgUpdate::downloadSuccessful(const QUrl &filepath) // resolve the blocker, and tell them the installer is already waiting. if (auto *window = qobject_cast(parent())) { if (window->closeForUpdate()) { - QTimer::singleShot(0, qApp, &QCoreApplication::quit); + QTimer::singleShot(0, qApp, [] { QCoreApplication::exit(0); }); } else { QMessageBox::warning(this, tr("Update"), tr("The update installer is already running and will finish the update once " "Cockatrice closes. Cockatrice is still busy, so it stays open for now.")); } } else { - QTimer::singleShot(0, qApp, &QCoreApplication::quit); + QTimer::singleShot(0, qApp, [] { QCoreApplication::exit(0); }); } close(); } else {