From: Christian Kamm Date: Thu, 28 Mar 2019 08:32:01 +0000 (+0100) Subject: Protocol, Notifications: Show destination() instead of _file X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~268 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=04e0e22513016255c7a585c81badb6c8a295ccd4;p=nextcloud-desktop.git 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. --- 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; }