Prechádzať zdrojové kódy

Make sure that we invalidate parents on blacklisted items

Add a missing call that we currently only do in slotItemCompleted.
This would normally only affect the first sync and would have
gotten properly update at the end of the sync anyway.
Jocelyn Turcotte 9 rokov pred
rodič
commit
82ef1bcfe0

+ 1 - 0
src/libsync/syncfilestatustracker.cpp

@@ -150,6 +150,7 @@ void SyncFileStatusTracker::slotAboutToPropagate(SyncFileItemVector& items)
 
         if (showErrorInSocketApi(*item)) {
             _syncProblems[item->_file] = SyncFileStatus::StatusError;
+            invalidateParentPaths(item->destination());
         } else if (showWarningInSocketApi(*item)) {
             _syncProblems[item->_file] = SyncFileStatus::StatusWarning;
         }

+ 0 - 2
test/testsyncfilestatustracker.cpp

@@ -310,10 +310,8 @@ private slots:
         // The root should show SYNC even though there is an error underneath,
         // since C/c1 is syncing and the SYNC status has priority.
         QCOMPARE(statusSpy.statusOf(""), SyncFileStatus(SyncFileStatus::StatusSync));
-        QEXPECT_FAIL("", "Only one blacklist item underneath, we shouldn't be showing SYNC.", Continue);
         QCOMPARE(statusSpy.statusOf("A"), SyncFileStatus(SyncFileStatus::StatusWarning));
         QCOMPARE(statusSpy.statusOf("A/a1"), SyncFileStatus(SyncFileStatus::StatusError));
-        QEXPECT_FAIL("", "Only one blacklist item underneath, we shouldn't be showing SYNC.", Continue);
         QCOMPARE(statusSpy.statusOf("B"), SyncFileStatus(SyncFileStatus::StatusWarning));
         QCOMPARE(statusSpy.statusOf("B/b0"), SyncFileStatus(SyncFileStatus::StatusError));
         QCOMPARE(statusSpy.statusOf("C"), SyncFileStatus(SyncFileStatus::StatusSync));