Activity View: honor error string even if no warning

that allows to specify a more specific user message to be displayed.
This commit is contained in:
Klaas Freitag 2014-09-25 15:03:54 +02:00
parent 8915f94931
commit 8ba08d7e87
2 changed files with 10 additions and 2 deletions

View File

@ -51,7 +51,9 @@ void PropagateItemJob::done(SyncFileItem::Status status, const QString &errorStr
_item._errorString += tr("; Restoration Failed: ") + errorString;
}
} else {
_item._errorString = errorString;
if( _item._errorString.isEmpty() ) {
_item._errorString = errorString;
}
}
if( _propagator->_abortRequested.fetchAndAddRelaxed(0) ) {

View File

@ -214,7 +214,13 @@ QTreeWidgetItem* ProtocolWidget::createCompletedTreewidgetItem(const QString& fo
}
} else {
message = Progress::asResultString(item);
// if the error string is set, it's prefered because it is a usefull user message.
// at least should be...
if(item._errorString.isEmpty()) {
message = Progress::asResultString(item);
} else {
message = item._errorString;
}
columns << message;
if (Progress::isSizeDependent(item._instruction)) {
columns << Utility::octetsToString( item._size );