Cockatrice/doc/doxygen
BruebachL 3aba1ef929
[Settings] Back up the settings folder before migrating (#7386)
* [Settings] Back up the settings folder before migrating

The per-file settings migration only preserved global.ini, as
global.ini.old. Everything else the migrations write was overwritten in
place with no way back: the legacy migration and the 17 per-domain
migrateXxxSettings functions all write straight into the per-domain .ini
files, so any of them that got a key mapping wrong silently replaced a
working file. The re-migration path is the sharpest case, because
migrateSettingsFromGlobalIni() runs again whenever an older build wrote
non-sentinel keys back into global.ini, and those values then land on
top of per-domain files the user had already edited.

Snapshot the whole settings folder before either migration runs, into a
timestamped sibling settings-backup-<yyyyMMdd-HHmmss>. A sibling rather
than a child, so a backup is never copied into the next backup and the
"Open Settings Folder" action keeps showing only live files. Keep every
snapshot; settings files are kilobytes, so growth is not a concern.

SettingsMigration::isMigrationPending() gates the copy so a normal start
creates nothing. It reuses the same condition migrateSettingsFromGlobalIni()
uses to decide whether it has work, factored into a shared helper so the
two cannot drift, and it ignores the legacy migration on an empty profile
where that migration only writes its sentinel. The backup itself skips a
folder whose files are all empty, which covers a fresh profile whose
global.ini was created but never written.

A failed copy logs a warning and returns an empty path rather than
aborting the migration, since a full disk or an unwritable data folder
must not leave the client unable to start. global.ini.old still works as
the single-file escape hatch.

Document the folder layout, the automatic backups, and the fact that
migrations only run forwards, so users know to copy the settings folder
before downgrading to a version that cannot read the per-group files.

* [Client] Match the desktop file name case for the portal app ID

QGuiApplication::setDesktopFileName() was given "Cockatrice"/"Oracle"
while the installed desktop entries are cockatrice.desktop and
oracle.desktop. Linux paths are case-sensitive, so xdg-desktop-portal
failed the app-info lookup for "Cockatrice" and Qt warned on every
QDesktopServices call that it could not register with the host portal.
The same string becomes the xdg-shell appId, so the window icon lookup
failed on Wayland for the same reason.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-10-03 14:59:58 +02:00
..
css Docs: Use doxygen-awesome-css theme (#6512) 2026-01-24 11:22:43 +01:00
extra-pages [Settings] Back up the settings folder before migrating (#7386) 2026-10-03 14:59:58 +02:00
filters [Networking] Doxygen (#7030) 2026-07-27 11:27:00 +02:00
groups Doxygen: Improve file structure and includes (#6344) 2025-11-22 19:38:39 +01:00
html [Doxygen] Add javascript to toggle call/caller graph visibility. (#6195) 2025-09-28 21:22:37 +02:00
images [Doxygen] Add documentation for beta channel. (#6510) 2026-01-11 12:48:31 +01:00
js [Doxygen] Add javascript to toggle call/caller graph visibility. (#6195) 2025-09-28 21:22:37 +02:00
theme@46483f1e5a Bump doc/doxygen/theme from d52eafe to 46483f1 (#7371) 2026-10-01 20:59:20 +02:00
DoxygenLayout.xml Docs: Use doxygen-awesome-css theme (#6512) 2026-01-24 11:22:43 +01:00
README.md Docs: Use doxygen-awesome-css theme (#6512) 2026-01-24 11:22:43 +01:00

Doxygen Documentation Theme

Required changes to the Doxyfile config from the theme docs to make doxygen-awesome-css work:

HTML_EXTRA_STYLESHEET  = doxygen-awesome.css      # Main CSS file of the theme
GENERATE_TREEVIEW      = YES                      # Optional, also works without
HTML_COLORSTYLE        = LIGHT                    # Required with doxygen-awesome-css theme, Auto Dark Mode will still work
DISABLE_INDEX          = NO                       # YES is bugged in the theme, see jothepro/doxygen-awesome-css/issues/201
FULL_SIDEBAR           = NO                       # Required for doxygen-awesome-css theme

Cockatrice dedicated color adjustments are configured in the cockatrice_docs_style.css file that uses & overrides the theme definitions.