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

#include <settings_migration.h>

Static Public Member Functions

static bool migrateSettingsFromGlobalIni (const QString &settingsPath)
static bool migrateLegacySettings (const QString &settingsPath)
static bool migrateGameFiltersToCamelCase (const QString &settingsPath)
static bool isMigrationPending (const QString &settingsPath)
static QString backupSettingsDirectory (const QString &settingsPath)

Member Function Documentation

◆ backupSettingsDirectory()

QString SettingsMigration::backupSettingsDirectory ( const QString & settingsPath)
static

Copies the whole settings directory to a timestamped sibling folder, so a migration that overwrites per-domain files can be undone by hand. Returns the backup path, or an empty string when there was nothing to back up or the copy failed. Never aborts the migration.

Here is the caller graph for this function:

◆ isMigrationPending()

bool SettingsMigration::isMigrationPending ( const QString & settingsPath)
static

Returns true when at least one of the two migrations would still do work, i.e. when a backup of the settings directory is worth taking before they run.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateGameFiltersToCamelCase()

bool SettingsMigration::migrateGameFiltersToCamelCase ( const QString & settingsPath)
static

Moves pre-camelCase gamefilters.ini keys (snake_case, game_type/<hash>) to the camelCase keys used since #7084, for profiles that already migrated before that rename and therefore never pass through migrateLegacySettings again. Copies values only where the new key is absent, never deletes the old keys, and returns true when anything was copied. Idempotent, so it runs on every startup.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateLegacySettings()

bool SettingsMigration::migrateLegacySettings ( const QString & settingsPath)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateSettingsFromGlobalIni()

bool SettingsMigration::migrateSettingsFromGlobalIni ( const QString & settingsPath)
static
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: