diff --git a/cockatrice/src/interface/deck_sync/deck_sync_profile.h b/cockatrice/src/interface/deck_sync/deck_sync_profile.h index ac63ab913..dff61a943 100644 --- a/cockatrice/src/interface/deck_sync/deck_sync_profile.h +++ b/cockatrice/src/interface/deck_sync/deck_sync_profile.h @@ -9,15 +9,16 @@ #include /** - * @struct DeckSyncProfile + * @class DeckSyncProfile * @brief Identifies which server and login a sync sidecar belongs to. * * A local deck folder can sync against several servers. Every server login * gets its own profile, and every profile gets its own sidecar file, so * switching servers never mixes up remote deck ids. */ -struct DeckSyncProfile +class DeckSyncProfile { +public: QString host; ///< Server hostname as entered by the user. int port = 0; ///< Server port. QString username; ///< Login name on that server. diff --git a/cockatrice/src/interface/deck_sync/deck_sync_sidecar.cpp b/cockatrice/src/interface/deck_sync/deck_sync_sidecar.cpp index 9e2785f41..2e3a5ba49 100644 --- a/cockatrice/src/interface/deck_sync/deck_sync_sidecar.cpp +++ b/cockatrice/src/interface/deck_sync/deck_sync_sidecar.cpp @@ -37,11 +37,12 @@ bool DeckSyncSidecar::load() continue; } const QJsonObject entry = it.value().toObject(); - const DeckSyncRecord record{.guid = entry.value("guid").toString(), - .remoteId = entry.value("remoteId").toInt(-1), - .baseHash = entry.value("baseHash").toString(), - .lastSyncSecs = static_cast(entry.value("lastSync").toDouble()), - .deleted = entry.value("deleted").toBool(false)}; + DeckSyncRecord record; + record.guid = entry.value("guid").toString(); + record.remoteId = entry.value("remoteId").toInt(-1); + record.baseHash = entry.value("baseHash").toString(); + record.lastSyncSecs = static_cast(entry.value("lastSync").toDouble()); + record.deleted = entry.value("deleted").toBool(false); recordMap.insert(it.key(), record); } return true; diff --git a/libcockatrice_deck_list/libcockatrice/deck_list/deck_diff.cpp b/libcockatrice_deck_list/libcockatrice/deck_list/deck_diff.cpp index 5024010b2..538de57e8 100644 --- a/libcockatrice_deck_list/libcockatrice/deck_list/deck_diff.cpp +++ b/libcockatrice_deck_list/libcockatrice/deck_list/deck_diff.cpp @@ -70,13 +70,14 @@ DeckDiffResult diff(const DeckList &oldDeck, const DeckList &newDeck) const int oldCount = oldCounts.value(key, 0); const ZoneCardInfo newInfo = newInfos.value(key, ZoneCardInfo()); if (oldCount != newInfo.count) { - const DeckCardChange change{.zone = key.first, - .cardName = key.second, - .oldCount = oldCount, - .newCount = newInfo.count, - .cardSetShortName = newInfo.cardSetShortName, - .cardSetNumber = newInfo.cardSetNumber, - .cardProviderId = newInfo.cardProviderId}; + DeckCardChange change; + change.zone = key.first; + change.cardName = key.second; + change.oldCount = oldCount; + change.newCount = newInfo.count; + change.cardSetShortName = newInfo.cardSetShortName; + change.cardSetNumber = newInfo.cardSetNumber; + change.cardProviderId = newInfo.cardProviderId; result.changes.append(change); } }