mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-07 18:43:26 -08:00
[DeckSync] Address conflict review nits: enum class and designated initializers
This commit is contained in:
parent
dd6c8423e6
commit
7ea4c36e98
4 changed files with 38 additions and 41 deletions
|
|
@ -583,15 +583,16 @@ void TabDeckStorage::onConflictRequest(const DeckSyncConflict &conflict)
|
|||
DlgSyncConflict dialog(conflict, this);
|
||||
if (dialog.exec() != QDialog::Accepted) {
|
||||
DeckSyncResolution skip;
|
||||
skip.action = DeckSyncSkipConflict;
|
||||
skip.action = DeckSyncResolutionAction::SkipConflict;
|
||||
syncManager->resolveConflict(skip);
|
||||
return;
|
||||
}
|
||||
const DeckSyncResolution resolution = dialog.resolution();
|
||||
if (resolution.rememberAlways &&
|
||||
(resolution.action == DeckSyncKeepMine || resolution.action == DeckSyncKeepServer)) {
|
||||
SettingsCache::instance().deckSync().setConflictDefault(
|
||||
resolution.action == DeckSyncKeepMine ? DeckSyncConflictKeepMine : DeckSyncConflictKeepServer);
|
||||
if (resolution.rememberAlways && (resolution.action == DeckSyncResolutionAction::KeepMine ||
|
||||
resolution.action == DeckSyncResolutionAction::KeepServer)) {
|
||||
SettingsCache::instance().deckSync().setConflictDefault(resolution.action == DeckSyncResolutionAction::KeepMine
|
||||
? DeckSyncConflictKeepMine
|
||||
: DeckSyncConflictKeepServer);
|
||||
}
|
||||
syncManager->resolveConflict(resolution);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue