Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <mail@ckamm.de>2019-03-28 11:32:01 +0300
committerChristian Kamm <mail@ckamm.de>2019-03-28 19:30:19 +0300
commit6ee2c9c595ea52ce5bfb52c0fde6438c03288ae5 (patch)
tree18bf4862a49b941e62113fc07278cbeb2d74c710
parentca7b4be18993bbe16c45dd169845eaf6f1573cb6 (diff)
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.
-rw-r--r--src/gui/folder.cpp10
-rw-r--r--src/gui/protocolwidget.cpp4
-rw-r--r--src/gui/syncrunfilelog.cpp2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp
index 89b1bcac3..5cb0d2bb6 100644
--- a/src/gui/folder.cpp
+++ b/src/gui/folder.cpp
@@ -366,13 +366,13 @@ void Folder::etagRetreivedFromSyncEngine(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/protocolwidget.cpp b/src/gui/protocolwidget.cpp
index 93a825115..77a7ed8f8 100644
--- a/src/gui/protocolwidget.cpp
+++ b/src/gui/protocolwidget.cpp
@@ -98,11 +98,11 @@ ProtocolItem *ProtocolItem::create(const QString &folder, const SyncFileItem &it
twitem->setData(0, Qt::SizeHintRole, QSize(0, ActivityItemDelegate::rowHeight()));
twitem->setIcon(0, icon);
twitem->setToolTip(0, longTimeStr);
- twitem->setToolTip(1, item._file);
+ twitem->setToolTip(1, item.destination());
twitem->setToolTip(3, message);
ProtocolItem::ExtraData data;
data.timestamp = timestamp;
- data.path = item._file;
+ data.path = item.destination();
data.folderName = folder;
data.status = item._status;
data.size = item._size;
diff --git a/src/gui/syncrunfilelog.cpp b/src/gui/syncrunfilelog.cpp
index 51b3fbaf5..74433ace3 100644
--- a/src/gui/syncrunfilelog.cpp
+++ b/src/gui/syncrunfilelog.cpp
@@ -148,7 +148,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;
}