Make progress aware of errors, first step.

This commit is contained in:
Klaas Freitag 2013-07-30 09:06:18 +02:00
parent f5bbb12434
commit 84e8ab5b71
3 changed files with 10 additions and 2 deletions

View file

@ -251,7 +251,7 @@ int CSyncThread::treewalkError(TREE_WALK_FILE* file)
if( file &&
(file->instruction == CSYNC_INSTRUCTION_STAT_ERROR ||
file->instruction == CSYNC_INSTRUCTION_ERROR) ) {
file->instruction == CSYNC_INSTRUCTION_ERROR) ) {
_mutex.lock();
_syncedItems[indx]._instruction = file->instruction;
_mutex.unlock();
@ -434,6 +434,9 @@ Progress::Kind CSyncThread::csyncToProgressKind( enum csync_notify_type_e kind )
case CSYNC_NOTIFY_FINISHED_SYNC_SEQUENCE:
pKind = Progress::EndSync;
break;
case CSYNC_NOTIFY_ERROR:
pKind = Progress::Error;
break;
default:
pKind = Progress::Invalid;
break;

View file

@ -87,6 +87,10 @@ void ProgressDispatcher::setProgressInfo(const QString& folder, Progress::Info n
return;
}
if( newProgress.kind == Progress::Error ) {
const char *msg = (const char*)newProgress.file_size;
qDebug() << "Progress-Error:" << QString::fromLocal8Bit(msg);
}
if( newProgress.kind == Progress::EndSync ) {
newProgress.overall_current_bytes = newProgress.overall_transmission_size;
newProgress.current_file_no = newProgress.overall_file_count;

View file

@ -37,7 +37,8 @@ public:
StartUpload,
EndDownload,
EndUpload,
EndSync
EndSync,
Error
};
typedef ProgressKind_s Kind;