Review Request 128861: [kdeconnect-kde] Fix division by null and use elapsed timer

Kai Uwe Broulik kde at privat.broulik.de
Sat Sep 10 20:53:23 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128861/
-----------------------------------------------------------

(Updated Sept. 10, 2016, 10:53 p.m.)


Status
------

This change has been marked as submitted.


Review request for kdeconnect.


Changes
-------

Submitted with commit 77ad9336b685c57a334d31bf7d92cd6185b8cfb1 by Kai Uwe Broulik to branch 1.x.


Repository: kdeconnect-kde


Description
-------

When sending multiple files from my phone to my PC I kdeconnectd usually got a SIGFPE. To get the transfer speed it divides the number of bytes received by the elapsed time which can be zero.

Also, since we're only interested in the time that has elapsed, use QElapsedTimer, which is exactly for this.QTime::elapsed also needs to take into account potential,y ocurred timezone / DST changes.


Diffs
-----

  core/filetransferjob.h ee434de 
  core/filetransferjob.cpp 9ee8205 

Diff: https://git.reviewboard.kde.org/r/128861/diff/


Testing
-------

I can copy a bunch of files without crashing now.

I didn't actually test whether the remaining time returned is still sensible since I never get to actually see the dialog since it's all so fast.


Thanks,

Kai Uwe Broulik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20160910/6074e620/attachment.html>


More information about the KDEConnect mailing list