Review Request 125164: Fix misbehavior when canceling a job

Aleix Pol Gonzalez aleixpol at kde.org
Fri Oct 23 00:46:14 UTC 2015



> On Oct. 22, 2015, 9:39 a.m., David Faure wrote:
> > src/core/transferjob.cpp, line 400
> > <https://git.reviewboard.kde.org/r/125164/diff/1/?file=402694#file402694line400>
> >
> >     Why slotFinished? Wouldn't just return be enough?
> >     kill() is supposed to take care of emitting finished already, and you don't want to emit it twice.
> 
> Aleix Pol Gonzalez wrote:
>     slotFinished is never called, if I remove the slotFinished call the test never ends.

I got deep to the issue. Here's the catch:
SchedulerPrivate::jobFinished did finish the job, but it didn't emit anything. slotFinished actually needed to be called after killing the job.

Then the modification in TransferJob isn't needed, which restores all of our karma and gives us an extra life and 10 coins. *happy*


- Aleix


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


On Oct. 23, 2015, 2:19 a.m., Aleix Pol Gonzalez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125164/
> -----------------------------------------------------------
> 
> (Updated Oct. 23, 2015, 2:19 a.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> Catch that the job has been cancelled and emit the job as finished.
> 
> Still, I'm not too sure it's the correct fix.
> 
> 
> Diffs
> -----
> 
>   autotests/jobtest.h ef8c3e1 
>   autotests/jobtest.cpp c24bcea 
>   src/core/transferjob.cpp 0c38070 
> 
> Diff: https://git.reviewboard.kde.org/r/125164/diff/
> 
> 
> Testing
> -------
> 
> Added a test and made it pass.
> 
> 
> Thanks,
> 
> Aleix Pol Gonzalez
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20151023/9a68b5df/attachment.html>


More information about the Kde-frameworks-devel mailing list