void ProgressInfo::recomputeCompletedSize()
{
    quint64 r = _totalSizeOfCompletedJobs;
    foreach(const ProgressItem &i, _currentItems) {
        if (isSizeDependent(i._item))
            r += i._progress._completed;
    }
    _sizeProgress.setCompleted(r);
}
void ProgressInfo::adjustTotalsForFile(const SyncFileItem &item)
{
    if (!shouldCountProgress(item)) {
        return;
    }

    _fileProgress._total += item._affectedItems;
    if (isSizeDependent(item)) {
        _sizeProgress._total += item._size;
    }
}
Beispiel #3
0
void ProgressInfo::adjustTotalsForFile(const SyncFileItem &item)
{
    if (!item._isDirectory) {
        _fileProgress._total++;
        if (isSizeDependent(item)) {
            _sizeProgress._total += item._size;
        }
    } else if (item._instruction != CSYNC_INSTRUCTION_NONE) {
        // Added or removed directories certainly count.
        _fileProgress._total++;
    }
}