[Client] Warn that the update installer force-closes within a minute

Telling the user Cockatrice just 'stays open for now' is misleading: the
installer launched by #7308 waits only about 60 s for a graceful close before it
force-terminates the process, which would lose unsaved work. State the deadline
and tell the user to save and close before then.
This commit is contained in:
Lukas Brübach 2026-09-21 19:00:10 +02:00
parent c3bc23a544
commit e1f1cf2e4a

View file

@ -249,14 +249,17 @@ void DlgUpdate::downloadSuccessful(const QUrl &filepath)
// card DB update, an open game, or an unsaved deck, and closeForUpdate() also reports a
// close already in progress (reached from a nested event loop while a shutdown prompt is
// up). Only quit when the shutdown really ran - otherwise keep running so the user can
// resolve the blocker, and tell them the installer is already waiting.
// resolve the blocker, and warn them that the installer only waits about a minute
// before it terminates the application to finish the update.
if (auto *window = qobject_cast<MainWindow *>(parent())) {
if (window->closeForUpdate()) {
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."));
tr("The update installer is already running and will terminate "
"Cockatrice within the next minute to finish the update. "
"Cockatrice is still busy, so save your work and close it "
"yourself before then."));
}
} else {
QTimer::singleShot(0, qApp, [] { QCoreApplication::exit(0); });