From b9270ecbeb736ef65276dcc91908a871dc812f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= <44814898+BruebachL@users.noreply.github.com> Date: Fri, 6 Nov 2026 09:15:28 +0100 Subject: [PATCH] [DeckSync] Address tombstone review nits: log category and designated initializer --- .../src/interface/deck_sync/deck_sync_manager.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cockatrice/src/interface/deck_sync/deck_sync_manager.cpp b/cockatrice/src/interface/deck_sync/deck_sync_manager.cpp index 126bbca77..30bd2e4a3 100644 --- a/cockatrice/src/interface/deck_sync/deck_sync_manager.cpp +++ b/cockatrice/src/interface/deck_sync/deck_sync_manager.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -27,6 +28,8 @@ #include #include +inline Q_LOGGING_CATEGORY(DeckSyncLog, "deck_sync"); + namespace { constexpr const char *SYNC_META_DIR = ".sync"; @@ -492,11 +495,11 @@ void DeckSyncManager::onUploadFinished(const Response &response, if (response.response_code() == Response::RespNameNotFound && deckId != -1) { // The server row is gone (purged tombstone or removed elsewhere): // upload the deck as new instead of updating a dead id. - UploadOp retry; - retry.relativePath = relativePath; - retry.serverPath = context.value("serverPath").toString(); - retry.deckId = -1; - retry.guid = context.value("guid").toString(); + const UploadOp retry{.relativePath = relativePath, + .serverPath = context.value("serverPath").toString(), + .serverDir = {}, + .deckId = -1, + .guid = context.value("guid").toString()}; pendingUploads.prepend(retry); processNext(); return; @@ -693,7 +696,7 @@ void DeckSyncManager::snapshotLocalFile(const QString &relativePath, const QStri } snapshot.write(source.readAll()); if (!snapshot.commit()) { - qWarning() << "DeckSync: could not write the base snapshot for" << relativePath; + qCWarning(DeckSyncLog) << "DeckSync: could not write the base snapshot for" << relativePath; } }