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 10643bf75..48dfeba5a 100644 --- a/cockatrice/src/interface/deck_sync/deck_sync_sidecar.cpp +++ b/cockatrice/src/interface/deck_sync/deck_sync_sidecar.cpp @@ -47,11 +47,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/cockatrice/src/interface/widgets/dialogs/dlg_deck_history.cpp b/cockatrice/src/interface/widgets/dialogs/dlg_deck_history.cpp index 90b375bdc..1e76ff7ed 100644 --- a/cockatrice/src/interface/widgets/dialogs/dlg_deck_history.cpp +++ b/cockatrice/src/interface/widgets/dialogs/dlg_deck_history.cpp @@ -89,11 +89,12 @@ void DlgDeckHistory::onHistoryFinished(const Response &response, const CommandCo const Response_DeckHistoryList &list = response.GetExtension(Response_DeckHistoryList::ext); versions.clear(); for (const DeckVersionInfo &version : list.versions()) { - const DeckHistoryVersion entry{.versionNo = version.version_no(), - .createdAtSecs = static_cast(version.created_at()), - .createdByClientId = QString::fromStdString(version.created_by_clientid()), - .hash = QString::fromStdString(version.hash()), - .content = QString::fromStdString(version.content())}; + DeckHistoryVersion entry; + entry.versionNo = version.version_no(); + entry.createdAtSecs = static_cast(version.created_at()); + entry.createdByClientId = QString::fromStdString(version.created_by_clientid()); + entry.hash = QString::fromStdString(version.hash()); + entry.content = QString::fromStdString(version.content()); versions.append(entry); } historyArrived = 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); } }