Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
CardUpdateProgress Struct Reference

One progress line read from the card database updater's stdout. More...

#include <card_update_progress.h>

Public Member Functions

QString stageToken () const
 Protocol token of the stage ("download", "scan", "import" or "unknown"), for logging.

Static Public Member Functions

static std::optional< CardUpdateProgress > fromProtocolLine (const QByteArray &line)
 Parses one line of the updater stdout protocol: "PROGRESS <stage> <done> <total>".

Public Attributes

CardUpdateStage stage = CardUpdateStage::Unknown
qint64 done = 0
qint64 total = 0

Detailed Description

One progress line read from the card database updater's stdout.

Member Function Documentation

◆ fromProtocolLine()

std::optional< CardUpdateProgress > CardUpdateProgress::fromProtocolLine ( const QByteArray & line)
static

Parses one line of the updater stdout protocol: "PROGRESS <stage> <done> <total>".

Parameters
linea single stdout line, with or without its trailing newline
Returns
the parsed progress, or std::nullopt when the line is not a valid progress line
Here is the caller graph for this function:

◆ stageToken()

QString CardUpdateProgress::stageToken ( ) const

Protocol token of the stage ("download", "scan", "import" or "unknown"), for logging.

Here is the caller graph for this function:

Member Data Documentation

◆ done

qint64 CardUpdateProgress::done = 0

◆ stage

CardUpdateStage CardUpdateProgress::stage = CardUpdateStage::Unknown

◆ total

qint64 CardUpdateProgress::total = 0

The documentation for this struct was generated from the following files: