D19857: [DownloadJob] Report total size only if known
Fabian Vogt
noreply at phabricator.kde.org
Tue Apr 2 10:50:17 BST 2019
fvogt requested changes to this revision.
fvogt added a comment.
This revision now requires changes to proceed.
Additionally, the `bytesReceived > totalAmount` case is currently not handled at all, but I'm not sure whether that's something for `KJob` or here.
INLINE COMMENTS
> downloadjob.cpp:111
> if (it != end) {
> - setTotalAmount(Bytes, it->toDouble());
> + const auto totalAmount = it->toDouble();
> + if (totalAmount > -1) {
To avoid casting and rounding errors later on, I suggest to use `const qlonglong totalAmount = it->toDouble();` here.
REPOSITORY
R856 Plasma Browser Integration
REVISION DETAIL
https://phabricator.kde.org/D19857
To: broulik, #plasma, fvogt
Cc: fvogt, bshah, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190402/a61ba581/attachment.html>
More information about the Plasma-devel
mailing list