Fix. Bulk upload. Accumulate sent bytes. Fix negative value in UI.

Signed-off-by: alex-z <blackslayer4@gmail.com>
This commit is contained in:
alex-z 2023-11-16 15:36:49 +01:00 committed by allexzander
parent c2143b0553
commit 19f7b87809
2 changed files with 4 additions and 1 deletions

View file

@ -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)

View file

@ -163,6 +163,8 @@ private:
std::vector<BulkUploadItem> _filesToUpload;
qint64 _sentTotal = 0;
SyncFileItem::Status _finalStatus = SyncFileItem::Status::NoStatus;
};