SocketAPI: Fix file error cache #3944
authorChristian Kamm <mail@ckamm.de>
Thu, 10 Dec 2015 09:23:21 +0000 (10:23 +0100)
committerChristian Kamm <mail@ckamm.de>
Thu, 10 Dec 2015 09:43:17 +0000 (10:43 +0100)
src/gui/folder.cpp
src/gui/folder.h

index ce19446305b4c9591b107c913d3055ecb14de3eb..f23b5d8c8cf449972efbc50c5ee4f2182c5cc3a4 100644 (file)
@@ -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)) {
index edc27d3fd8a3a74b287d54acad9281b9eebf5677..ea7ad712cab8db02b05f821e76df6f52a136e093 100644 (file)
@@ -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<QString>   _stateLastSyncItemsWithErrorNew; // gets moved to _stateLastSyncItemsWithError at end of sync
     QSet<QString>   _stateLastSyncItemsWithError;
+
+    // SocketAPI: A folder is tained if we got a file watcher notification
+    // for it. It's displayed as EVAL.
     QSet<QString>   _stateTaintedFolders;
 
     SyncJournalDb _journal;