Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
settings_migration.cpp File Reference
#include "settings_migration.h"
#include <QChar>
#include <QDateTime>
#include <QDebug>
#include <QDir>
#include <QDirIterator>
#include <QFile>
#include <QFileInfo>
#include <QFileInfoList>
#include <QFlags>
#include <QList>
#include <QLoggingCategory>
#include <QMap>
#include <QMessageLogger>
#include <QSettings>
#include <QSharedPointer>
#include <QStringList>
#include <QStringLiteral>
#include <QVariant>
#include <algorithm>
#include <utility>
Include dependency graph for settings_migration.cpp:

Functions

 Q_LOGGING_CATEGORY (SettingsMigrationLog, "settings_migration")
static bool hasPendingGlobalIniSettings (const QString &settingsPath)
static void migrateTabsSettings (const QString &settingsPath, QSettings &globalIni)
static void migrateSoundSettings (const QString &settingsPath, QSettings &globalIni)
static void migrateGameSettings (const QString &settingsPath, QSettings &globalIni)
static void migrateChatSettings (const QString &settingsPath, QSettings &globalIni)
static void migrateCacheStorageSettings (const QString &settingsPath, QSettings &globalIni)
static void migrateUpdatesSettings (const QString &settingsPath, QSettings &globalIni)
static void migratePersonalSettings (const QString &settingsPath, QSettings &globalIni)
static void migrateCardsDisplaySettings (const QString &settingsPath, QSettings &globalIni)
static void migrateCardCounterSettings (const QString &settingsPath, QSettings &globalIni)
static void migrateInterfaceSettings (const QString &settingsPath, QSettings &globalIni)
static void migrateDownloadSettings (const QString &settingsPath, QSettings &globalIni)
static void migrateAppearanceSettings (const QString &settingsPath, QSettings &globalIni)
static void migrateNetworkSettings (const QString &settingsPath, QSettings &globalIni)
static void migratePathsSettings (const QString &settingsPath, QSettings &globalIni)
static void migrateVisualDeckStorageSettings (const QString &settingsPath, QSettings &globalIni)
static void migrateDeckEditorSettings (const QString &settingsPath, QSettings &globalIni)
static void migrateLegacySets (const QString &settingsPath)
static void migrateLegacyServers (const QString &settingsPath)
static void migrateLegacyMessages (const QString &settingsPath)
static const QMap< QString, QString > & renamedGameFilterKeys ()
static void migrateLegacyGameFilters (const QString &settingsPath)
static bool gameFiltersCamelCaseMigrationPending (const QString &settingsPath)

Variables

static const QString MIGRATION_SENTINEL_KEY = QStringLiteral("migration/perfile_complete")
static const QString LEGACY_GAME_FILTERS_GAME_TYPE_PREFIX = QStringLiteral("filter_games/game_type/")
static const QString GAME_FILTERS_GAME_TYPE_PREFIX = QStringLiteral("filter_games/gameType/")

Function Documentation

◆ gameFiltersCamelCaseMigrationPending()

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

◆ hasPendingGlobalIniSettings()

bool hasPendingGlobalIniSettings ( const QString & settingsPath)
static

True when global.ini holds keys that migrateSettingsFromGlobalIni() would still move, i.e. the exact condition that function uses to decide whether it has work to do. If a user runs an older Cockatrice build that writes to global.ini (non-sentinel keys) and then upgrades back, those new keys would otherwise be silently ignored, so they are re-migrated instead.

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

◆ migrateAppearanceSettings()

void migrateAppearanceSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateCacheStorageSettings()

void migrateCacheStorageSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateCardCounterSettings()

void migrateCardCounterSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateCardsDisplaySettings()

void migrateCardsDisplaySettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateChatSettings()

void migrateChatSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateDeckEditorSettings()

void migrateDeckEditorSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateDownloadSettings()

void migrateDownloadSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateGameSettings()

void migrateGameSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateInterfaceSettings()

void migrateInterfaceSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateLegacyGameFilters()

void migrateLegacyGameFilters ( const QString & settingsPath)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateLegacyMessages()

void migrateLegacyMessages ( const QString & settingsPath)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateLegacyServers()

void migrateLegacyServers ( const QString & settingsPath)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateLegacySets()

void migrateLegacySets ( const QString & settingsPath)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateNetworkSettings()

void migrateNetworkSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migratePathsSettings()

void migratePathsSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migratePersonalSettings()

void migratePersonalSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateSoundSettings()

void migrateSoundSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateTabsSettings()

void migrateTabsSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateUpdatesSettings()

void migrateUpdatesSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ migrateVisualDeckStorageSettings()

void migrateVisualDeckStorageSettings ( const QString & settingsPath,
QSettings & globalIni )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Q_LOGGING_CATEGORY()

Q_LOGGING_CATEGORY ( SettingsMigrationLog ,
"settings_migration"  )
inline
Here is the call graph for this function:

◆ renamedGameFilterKeys()

const QMap< QString, QString > & renamedGameFilterKeys ( )
static

gamefilters.ini keys renamed to camelCase by #7084. Profiles that migrated from the legacy native store before that rename still hold the old snake_case keys, which nothing reads anymore, so their saved filters silently stopped loading.

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

Variable Documentation

◆ GAME_FILTERS_GAME_TYPE_PREFIX

const QString GAME_FILTERS_GAME_TYPE_PREFIX = QStringLiteral("filter_games/gameType/")
static

◆ LEGACY_GAME_FILTERS_GAME_TYPE_PREFIX

const QString LEGACY_GAME_FILTERS_GAME_TYPE_PREFIX = QStringLiteral("filter_games/game_type/")
static

◆ MIGRATION_SENTINEL_KEY

const QString MIGRATION_SENTINEL_KEY = QStringLiteral("migration/perfile_complete")
static