Skip to content

Commit

Permalink
SocketAPI: Don't use ERROR for SoftErrors owncloud#3944
Browse files Browse the repository at this point in the history
  • Loading branch information
ckamm committed Dec 10, 2015
1 parent f65a29d commit b94281d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,16 @@ void Folder::slotWatchedPathChanged(const QString& path)
}
}

static bool showErrorInSocketApi(const SyncFileItemPtr& item)
{
const auto status = item->_status;
return status == SyncFileItem::NormalError
|| status == SyncFileItem::FatalError;
}

static void addErroredSyncItemPathsToList(const SyncFileItemVector& items, QSet<QString>* set) {
Q_FOREACH(const SyncFileItemPtr &item, items) {
if (item->hasErrorStatus()) {
foreach (const SyncFileItemPtr &item, items) {
if (showErrorInSocketApi(item)) {
set->insert(item->_file);
}
}
Expand Down Expand Up @@ -1090,7 +1097,7 @@ void Folder::slotTransmissionProgress(const ProgressInfo &pi)
// a item is completed: count the errors and forward to the ProgressDispatcher
void Folder::slotItemCompleted(const SyncFileItem &item, const PropagatorJob& job)
{
if (item.hasErrorStatus()) {
if (showErrorInSocketApi(item)) {
_stateLastSyncItemsWithErrorNew.insert(item._file);
}

Expand Down

0 comments on commit b94281d

Please sign in to comment.