In case the download size isn't known, the browser reports -1
- Group Reviewers
- R856:3989f42ac5f0: [DownloadJob] Report total size only if known
It now shows "xyz MiB of 0 B" so we don't handle that in notifications but it's better than -1 B
Or should I explicitly setTotalAmount(0) in this case?
Additionally, the bytesReceived > totalAmount case is currently not handled at all, but I'm not sure whether that's something for KJob or here.
To avoid casting and rounding errors later on, I suggest to use const qlonglong totalAmount = it->toDouble(); here.