kjob::exec and autodeletion

Till Adam adam at kde.org
Sun Apr 12 16:36:45 BST 2009


On Sunday 12 April 2009 10:43:38 Kevin Ottens wrote:
> 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.

Yeah, Thiago agrees.I'll report it.

> > 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 style.

Committed with those changes.

Cheers,

Till


-- 
Till Adam <adam at kde.org>





More information about the kde-core-devel mailing list