mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-27 00:14:40 -07:00
[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:
parent
c3bc23a544
commit
e1f1cf2e4a
1 changed files with 6 additions and 3 deletions
|
|
@ -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
|
// 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
|
// 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
|
// 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 (auto *window = qobject_cast<MainWindow *>(parent())) {
|
||||||
if (window->closeForUpdate()) {
|
if (window->closeForUpdate()) {
|
||||||
QTimer::singleShot(0, qApp, [] { QCoreApplication::exit(0); });
|
QTimer::singleShot(0, qApp, [] { QCoreApplication::exit(0); });
|
||||||
} else {
|
} else {
|
||||||
QMessageBox::warning(this, tr("Update"),
|
QMessageBox::warning(this, tr("Update"),
|
||||||
tr("The update installer is already running and will finish the update once "
|
tr("The update installer is already running and will terminate "
|
||||||
"Cockatrice closes. Cockatrice is still busy, so it stays open for now."));
|
"Cockatrice within the next minute to finish the update. "
|
||||||
|
"Cockatrice is still busy, so save your work and close it "
|
||||||
|
"yourself before then."));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
QTimer::singleShot(0, qApp, [] { QCoreApplication::exit(0); });
|
QTimer::singleShot(0, qApp, [] { QCoreApplication::exit(0); });
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue