[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KJob deleting itself too early?
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2007-11-19 22:21:52
Message-ID: 20071119222152.GA18576 () morpheus ! apaku ! dnsalias ! org
[Download RAW message or body]

On 19.11.07 23:06:09, David Faure wrote:
> On Sunday 18 November 2007, Andreas Pakulat wrote:
> > Hi,
> > 
> > I'd like to know why KJob deletes itself when he's done doing its work?
> > Shouldn't this be done by whoever creates the KJob?
> No, many jobs are fire-and-forget, and when they're not, people would forget to delete them.
> The job is done, it's done, it deletes itself. KDE3's KIO::Job has always worked like that.
> 
> > I don't think its a good idea to delete the job behind the back of the
> > user, in particular when you don't know how a KJob instance (or subclass
> > thereof) is used.
> Doesn't matter how it's used: after the job emits finished, it's finished :)

Yeah, but the problem is I can't access the data the job carries after a
run of the event loop. 

I don't care if KIO jobs are fire-and-forget, but for a general-purpose
job class in kdelibs/kdecore this just sounds like an uneeded
restriction. In particular this makes it impossible to have KJob provide
the job-implementation for KDevelop VCS support. 

Andreas

-- 
Don't look now, but the man in the moon is laughing at you.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic