mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-06 01:53:25 -08:00
[DeckSync] Pass the sync summary through the signal and tidy the manager API
- Emit SyncSummary from syncFinished() instead of four positional ints, and build it from a single currentSummary() helper, so the counts cannot drift between the status message and the signal. - Use a designated initializer for LocalFile, like the other records. - Drop setClient() and setColorIdentityProvider(): both fields are already constructor parameters and the setters had no callers. setProfile() and setDeckPath() stay, since the tab re-reads them before every run. - Fix the include paths in tab_deck_storage.h and the narrowing conversion of the tree item id, so the branch builds again.
This commit is contained in:
parent
f9cbeb2f21
commit
4fd03576e5
4 changed files with 31 additions and 33 deletions
|
|
@ -565,7 +565,7 @@ void TabDeckStorage::onSyncStatusMessage(const QString &message)
|
|||
renderSyncStatus();
|
||||
}
|
||||
|
||||
void TabDeckStorage::onSyncFinished(int uploaded, int downloaded, int unchanged, int skipped, const QString &error)
|
||||
void TabDeckStorage::onSyncFinished(const SyncSummary &summary, const QString &error)
|
||||
{
|
||||
aSyncNow->setEnabled(remoteEnabled);
|
||||
if (!error.isEmpty()) {
|
||||
|
|
@ -574,7 +574,7 @@ void TabDeckStorage::onSyncFinished(int uploaded, int downloaded, int unchanged,
|
|||
} else {
|
||||
syncStatusType = SyncStatusType::Finished;
|
||||
syncStatusDetail.clear();
|
||||
lastSyncSummary = {uploaded, downloaded, unchanged, skipped};
|
||||
lastSyncSummary = summary;
|
||||
}
|
||||
renderSyncStatus();
|
||||
if (error.isEmpty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue