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.
This commit is contained in:
Jocelyn Turcotte 2016-08-05 17:18:16 +02:00
parent b7ff4a76e8
commit 82ef1bcfe0
2 changed files with 1 additions and 2 deletions

View File

@ -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;
}

View File

@ -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));