mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-07 18:43:26 -08:00
[Client] Improve card database update visibility (#7458)
* [Client] Improve card database update visibility Addresses Cockatrice/Cockatrice#7431. Cockatrice previously offered no in-client feedback while the card database updater ran: the only progress UI lived in the first-run wizard, stderr/stdout were not parsed in interactive runs, and starting a second update with Oracle already open or with a hidden background run active just showed a confusing 'already running' guard - even though Oracle is launched as a separate process with no lifecycle tracking. - Add a status-bar widget (CardDatabaseUpdateStatusBar) that appears while an update runs and shows the Downloading/Parsing/Importing stages with percent progress; it is also used in the quit-confirm prompt so users see an unfinished update before cancelling it. - Parse the updater's PROGRESS lines (new CardUpdateProgressParser, unit-tested) in both foreground and background runs and log stage changes to the new card_database.update category, throttled to at most one line per second; forward Oracle stderr to the logs. - Show a tray balloon when a background update starts and on finish or failure instead of staying silent. - Request a running Oracle instance to raise itself (QLocalServer CockatriceOracleRaise-<user>) when the user starts another update, and demote the 'already running' guard to an informative message only when no running instance can be found. - Emit download/scan/import progress unconditionally from Oracle so interactive and background runs behave the same. - Document the new log category in the troubleshooting guide. * [Client] Address card database update review feedback * [Client] Add setting to control card database update tray notifications * [Client] Address remaining card database update review nits - Rename card_update_progress_parser.{h,cpp} to card_update_progress.{h,cpp} - Store the CardUpdateProgress struct in the status bar widget * Lint. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
6bed5d6f67
commit
a44757bd11
26 changed files with 702 additions and 67 deletions
|
|
@ -185,9 +185,10 @@ private:
|
|||
|
||||
/**
|
||||
* Whether readSetsFromByteArray() should report scan progress via
|
||||
* dataReadProgress. A background run routes that signal to stdout (for the
|
||||
* hosting Cockatrice client to parse); the flag exists to skip the scanner
|
||||
* instrumentation entirely when no consumer needs it.
|
||||
* dataReadProgress. The wizard streams that signal to stdout (for the
|
||||
* hosting Cockatrice client to parse) in both interactive and background
|
||||
* runs; the flag exists to skip the scanner instrumentation entirely when
|
||||
* no consumer needs it.
|
||||
*/
|
||||
bool progressReporting = true;
|
||||
|
||||
|
|
@ -255,9 +256,9 @@ public:
|
|||
* @brief Controls whether readSetsFromByteArray() instruments the raw scan.
|
||||
*
|
||||
* When enabled (the default) the raw scanner reports progress via
|
||||
* dataReadProgress(), which an interactive wizard shows on its progress bar
|
||||
* and a background run routes to stdout for the hosting client. Switch it
|
||||
* off only when nothing will consume scan progress.
|
||||
* dataReadProgress(), which the wizard streams to stdout (so the hosting
|
||||
* Cockatrice client can show it) and also displays on its own progress bar.
|
||||
* Switch it off only when nothing will consume scan progress.
|
||||
*/
|
||||
void setProgressReporting(bool enabled)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue