From 04e0e22513016255c7a585c81badb6c8a295ccd4 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Thu, 28 Mar 2019 09:32:01 +0100 Subject: [PATCH] Protocol, Notifications: Show destination() instead of _file destination() now consistently points to the file after the successful sync operation. _file might be the place the item was moved from. --- src/gui/folder.cpp | 10 +++++----- src/gui/syncrunfilelog.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 8bc375571..fbb348476 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -366,13 +366,13 @@ void Folder::etagRetrievedFromSyncEngine(const QString &etag) void Folder::showSyncResultPopup() { if (_syncResult.firstItemNew()) { - createGuiLog(_syncResult.firstItemNew()->_file, LogStatusNew, _syncResult.numNewItems()); + createGuiLog(_syncResult.firstItemNew()->destination(), LogStatusNew, _syncResult.numNewItems()); } if (_syncResult.firstItemDeleted()) { - createGuiLog(_syncResult.firstItemDeleted()->_file, LogStatusRemove, _syncResult.numRemovedItems()); + createGuiLog(_syncResult.firstItemDeleted()->destination(), LogStatusRemove, _syncResult.numRemovedItems()); } if (_syncResult.firstItemUpdated()) { - createGuiLog(_syncResult.firstItemUpdated()->_file, LogStatusUpdated, _syncResult.numUpdatedItems()); + createGuiLog(_syncResult.firstItemUpdated()->destination(), LogStatusUpdated, _syncResult.numUpdatedItems()); } if (_syncResult.firstItemRenamed()) { @@ -383,12 +383,12 @@ void Folder::showSyncResultPopup() if (renTarget != renSource) { status = LogStatusMove; } - createGuiLog(_syncResult.firstItemRenamed()->_originalFile, status, + createGuiLog(_syncResult.firstItemRenamed()->_file, status, _syncResult.numRenamedItems(), _syncResult.firstItemRenamed()->_renameTarget); } if (_syncResult.firstNewConflictItem()) { - createGuiLog(_syncResult.firstNewConflictItem()->_file, LogStatusConflict, _syncResult.numNewConflictItems()); + createGuiLog(_syncResult.firstNewConflictItem()->destination(), LogStatusConflict, _syncResult.numNewConflictItems()); } if (int errorCount = _syncResult.numErrorItems()) { createGuiLog(_syncResult.firstItemError()->_file, LogStatusError, errorCount); diff --git a/src/gui/syncrunfilelog.cpp b/src/gui/syncrunfilelog.cpp index 14250015e..77b0bf89b 100644 --- a/src/gui/syncrunfilelog.cpp +++ b/src/gui/syncrunfilelog.cpp @@ -175,7 +175,7 @@ void SyncRunFileLog::logItem(const SyncFileItem &item) _out << ts << L; _out << L; if (item._instruction != CSYNC_INSTRUCTION_RENAME) { - _out << item._file << L; + _out << item.destination() << L; } else { _out << item._file << QLatin1String(" -> ") << item._renameTarget << L; } -- 2.30.2