kjob::exec and autodeletion

Kevin Ottens ervin at kde.org
Sun Apr 12 09:43:38 BST 2009

On Saturday 11 April 2009 21:47:16 Till Adam wrote:
> Attached patch works around this issue. I can't make up my mind whether
> this is to be considered a bug in Qt, after all the chain of events
> _should_ be, at least according to my expectations:
> - job emits result
> - slot connected to result() syncronously executes, in this case
> QEventLooop::quit(), since we are single threaded here, presumably
> - job calls deleteLater() on itself
> - deletion event gets posted to the event queue
> - secondary event loop does no further processing, since it's been quit
> - QEventLoop::exec returns to the job's exec(), which started it
> - job's exec() finishes processing
> - primary event loop processes deletion event and actually deletes the job

Yeah, from my point of view you get this chain of action right and then that 
sounds like a Qt bug to me.

> In any case, shall I commit the workaround, or does someone have a better
> one?

It's OK as a workaround IMO. That said could you please use the kdelibs coding 
style for your modifications? (namely having the opening brace on the same 
line than the if, and no extra space in between the parenthesis). I know this 
file is inconsistent but I'd like to slowly see it respect kdelibs coding 

Thanks in advance.

Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090412/f8997ae2/attachment.sig>

More information about the kde-core-devel mailing list