[PATCH] Take care also of the KJob::finished signal in KPart - it also fixes Ark's BUG 187538

Raphael Kubo da Costa kubito at gmail.com
Tue Apr 7 21:00:22 BST 2009


2009/4/7 David Faure <faure at kde.org>:
> IMHO this introduces a bug that every bit of code that expects result() to be emitted
> in all cases where the job is killed [*] is now running under a false assumption, exactly
> like this kpart code, but there's probably a lot more like it. I think we should make
> the "cancel" button call kill(EmitResult).
The attached patch is the same I've uploaded to the reviewboard
request. It fixes KUiServerJobTracker by introducing a new protected
slot that calls kill(EmitResult) as suggested by David Faure and in a
certain way by Aaron Seigo too.

It's not very efficient because it calls QHash::keys -- actually, I'm
not sure if we need to call keys() and then have that Q_ASSERT or we
can rely there's only one job with that jobview and call key()
directly.

Is this OK?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdeui_fix_kill_emitresult.diff
Type: text/x-patch
Size: 1718 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090407/3102b05d/attachment.bin>


More information about the kde-core-devel mailing list