SLOT(slotAboutToRestoreBackup(bool*)));
connect(_engine.data(), SIGNAL(folderDiscovered(bool,QString)), this, SLOT(slotFolderDiscovered(bool,QString)));
connect(_engine.data(), SIGNAL(transmissionProgress(ProgressInfo)), this, SLOT(slotTransmissionProgress(ProgressInfo)));
- connect(_engine.data(), SIGNAL(itemCompleted(const SyncFileItem &, const PropagatorJob &)),
- this, SLOT(slotItemCompleted(const SyncFileItem &, const PropagatorJob &)));
+ connect(_engine.data(), SIGNAL(itemCompleted(const SyncFileItemPtr &)),
+ this, SLOT(slotItemCompleted(const SyncFileItemPtr &)));
- connect(_engine.data(), SIGNAL(newBigFolder(QString)), this, SLOT(slotNewBigFolderDiscovered(QString)));
+ connect(_engine.data(), SIGNAL(newBigFolder(QString,bool)),
+ this, SLOT(slotNewBigFolderDiscovered(QString,bool)));
connect(_engine.data(), SIGNAL(seenLockedFile(QString)), FolderMan::instance(), SLOT(slotSyncOnceFileUnlocks(QString)));
connect(_engine.data(), SIGNAL(aboutToPropagate(SyncFileItemVector&)),
SLOT(slotLogPropagationStart()));
}
// a item is completed: count the errors and forward to the ProgressDispatcher
-void Folder::slotItemCompleted(const SyncFileItem &item, const PropagatorJob& job)
+void Folder::slotItemCompleted(const SyncFileItemPtr &item)
{
- if (Progress::isWarningKind(item._status)) {
- // Count all error conditions.
- _syncResult.setWarnCount(_syncResult.warnCount()+1);
+ // add new directories or remove gone away dirs to the watcher
+ if (item->_isDirectory && item->_instruction == CSYNC_INSTRUCTION_NEW ) {
+ FolderMan::instance()->addMonitorPath( alias(), path()+item->_file );
}
- _fileLog->logItem(item);
- emit ProgressDispatcher::instance()->itemCompleted(alias(), item, job);
+ if (item->_isDirectory && item->_instruction == CSYNC_INSTRUCTION_REMOVE ) {
+ FolderMan::instance()->removeMonitorPath( alias(), path()+item->_file );
+ }
+
+ _syncResult.processCompletedItem(item);
+
+ _fileLog->logItem(*item);
+ emit ProgressDispatcher::instance()->itemCompleted(alias(), item);
}
- void Folder::slotNewBigFolderDiscovered(const QString &newF)
+ void Folder::slotNewBigFolderDiscovered(const QString &newF, bool isExternal)
{
auto newFolder = newF;
if (!newFolder.endsWith(QLatin1Char('/'))) {