Use the status instead of the instruction for finished items

This commit is contained in:
Olivier Goffart 2013-10-30 10:44:41 +01:00
parent 6e088e28f5
commit b079cedbf5
2 changed files with 5 additions and 5 deletions

View File

@ -302,7 +302,7 @@ void Folder::bubbleUpSyncResult()
Logger *logger = Logger::instance();
foreach (const SyncFileItem &item, _syncResult.syncFileItemVector() ) {
if( item._instruction == CSYNC_INSTRUCTION_ERROR ) {
if( item._status == SyncFileItem::FatalError || item._status == SyncFileItem::NormalError ) {
slotCSyncError( tr("File %1: %2").arg(item._file).arg(item._errorString) );
logger->postOptionalGuiLog(tr("File %1").arg(item._file), item._errorString);

View File

@ -110,8 +110,8 @@ void ProtocolWidget::setSyncResult( const SyncResult& result )
QString tooltip;
// handle ignored files here.
if( item._instruction == CSYNC_INSTRUCTION_IGNORE
|| item._instruction == CSYNC_INSTRUCTION_CONFLICT ) {
if( item._status == SyncFileItem::FileIgnored
|| item._status == SyncFileItem::Conflict ) {
QStringList columns;
QString timeStr = timeString(dt);
QString longTimeStr = timeString(dt, QLocale::LongFormat);
@ -119,7 +119,7 @@ void ProtocolWidget::setSyncResult( const SyncResult& result )
columns << timeStr;
columns << item._file;
columns << folder;
if( item._instruction == CSYNC_INSTRUCTION_IGNORE) {
if( item._status == SyncFileItem::FileIgnored ) {
if( item._type == SyncFileItem::SoftLink ) {
errMsg = tr("Soft Link ignored");
tooltip = tr("Softlinks break the semantics of synchronization.\nPlease do not "
@ -143,7 +143,7 @@ void ProtocolWidget::setSyncResult( const SyncResult& result )
"syncing in a cross platform environment").arg(obj);
}
}
} else if( item._instruction == CSYNC_INSTRUCTION_CONFLICT ) {
} else if( item._status == SyncFileItem::Conflict ) {
errMsg = tr("Conflict file.");
tooltip = tr("The file was changed on server and local repository and as a result it\n"
"created a so called conflict. The local change is copied to the conflict\n"