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

Warns when user data lives inside the program directory and backs it up first. More...

#include <at_risk_data_warning.h>

Classes

struct  AtRiskBackupOutcome

Static Public Member Functions

static void warnAboutDataPathsInProgramDir (QWidget *parent)
 Backs up at-risk data paths and warns about them.

Static Private Member Functions

static QStringList collectInstalledAtRiskPaths (const QString &appDir)
static AtRiskBackupOutcome backUpAtRiskPaths (const QStringList &sources, const QString &appDir)
static QString buildInstalledAtRiskMessage (const QStringList &offenders, const QStringList &sources, const AtRiskBackupOutcome &outcome)
static void showAtRiskDataWarning (QWidget *parent, const QString &title, const QString &message)

Detailed Description

Warns when user data lives inside the program directory and backs it up first.

The uninstallers shipped in Cockatrice 3.1.0/3.1.1 delete the whole install tree, so data paths configured inside the program directory get a safety backup outside the install directory before the warning is shown. Portable installs keep their data inside the program directory by design but never shipped an uninstaller, so they are skipped.

Member Function Documentation

◆ backUpAtRiskPaths()

AtRiskDataWarning::AtRiskBackupOutcome AtRiskDataWarning::backUpAtRiskPaths ( const QStringList & sources,
const QString & appDir )
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildInstalledAtRiskMessage()

QString AtRiskDataWarning::buildInstalledAtRiskMessage ( const QStringList & offenders,
const QStringList & sources,
const AtRiskBackupOutcome & outcome )
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ collectInstalledAtRiskPaths()

QStringList AtRiskDataWarning::collectInstalledAtRiskPaths ( const QString & appDir)
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showAtRiskDataWarning()

void AtRiskDataWarning::showAtRiskDataWarning ( QWidget * parent,
const QString & title,
const QString & message )
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ warnAboutDataPathsInProgramDir()

void AtRiskDataWarning::warnAboutDataPathsInProgramDir ( QWidget * parent)
static

Backs up at-risk data paths and warns about them.

Parameters
parentParent widget for the warning dialog
Here is the call graph for this function:
Here is the caller graph for this function:

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