Skip to content

Commit

Permalink
Fix. Bulk upload. Accumulate sent bytes. Fix negative value in UI.
Browse files Browse the repository at this point in the history
Signed-off-by: alex-z <[email protected]>
  • Loading branch information
allexzander committed Nov 20, 2023
1 parent c2143b0 commit fb0b314
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libsync/bulkpropagatorjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,11 @@ void BulkPropagatorJob::slotUploadProgress(SyncFileItemPtr item, qint64 sent, qi
// resetting progress due to the sent being zero by ignoring it.
// finishedSignal() is bound to be emitted soon anyway.
// See https://bugreports.qt.io/browse/QTBUG-44782.
_sentTotal += sent;
if (sent == 0 && total == 0) {
return;
}
propagator()->reportProgress(*item, sent - total);
propagator()->reportProgress(*item, _sentTotal);
}

void BulkPropagatorJob::slotJobDestroyed(QObject *job)
Expand Down
2 changes: 2 additions & 0 deletions src/libsync/bulkpropagatorjob.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ private slots:

std::vector<BulkUploadItem> _filesToUpload;

qint64 _sentTotal = 0;

SyncFileItem::Status _finalStatus = SyncFileItem::Status::NoStatus;
};

Expand Down

0 comments on commit fb0b314

Please sign in to comment.