From fd18c565b0bc36d7706633838fcac59f0b0ec634 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Thu, 10 Dec 2015 10:23:21 +0100 Subject: [PATCH] SocketAPI: Fix file error cache #3944 --- src/gui/folder.cpp | 6 +++--- src/gui/folder.h | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index ce1944630..f23b5d8c8 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -632,7 +632,7 @@ static void addErroredSyncItemPathsToList(const SyncFileItemVector& items, QSet< void Folder::slotThreadTreeWalkResult(const SyncFileItemVector& items) { - addErroredSyncItemPathsToList(items, &this->_stateLastSyncItemsWithError); + addErroredSyncItemPathsToList(items, &this->_stateLastSyncItemsWithErrorNew); _syncResult.setSyncFileItemVector(items); } @@ -642,7 +642,7 @@ void Folder::slotAboutToPropagate(SyncFileItemVector& items) // (which imply the folder) to generate the syncing state icon now. _stateTaintedFolders.clear(); - addErroredSyncItemPathsToList(items, &this->_stateLastSyncItemsWithError); + addErroredSyncItemPathsToList(items, &this->_stateLastSyncItemsWithErrorNew); } @@ -1091,7 +1091,7 @@ void Folder::slotTransmissionProgress(const ProgressInfo &pi) void Folder::slotItemCompleted(const SyncFileItem &item, const PropagatorJob& job) { if (item.hasErrorStatus()) { - _stateLastSyncItemsWithError.insert(item._file); + _stateLastSyncItemsWithErrorNew.insert(item._file); } if (Progress::isWarningKind(item._status)) { diff --git a/src/gui/folder.h b/src/gui/folder.h index edc27d3fd..ea7ad712c 100644 --- a/src/gui/folder.h +++ b/src/gui/folder.h @@ -307,9 +307,13 @@ private: /// Reset when no follow-up is requested. int _consecutiveFollowUpSyncs; - // For the SocketAPI folder states + // SocketAPI: Cache files and folders that had errors so that they can + // get a red ERROR icon. QSet _stateLastSyncItemsWithErrorNew; // gets moved to _stateLastSyncItemsWithError at end of sync QSet _stateLastSyncItemsWithError; + + // SocketAPI: A folder is tained if we got a file watcher notification + // for it. It's displayed as EVAL. QSet _stateTaintedFolders; SyncJournalDb _journal; -- 2.30.2