Need a general point of view about jobs

David Faure faure at kde.org
Thu Jan 25 22:51:27 GMT 2007


On Thursday 25 January 2007 23:15, Rafael Fernández López wrote:
>  I propose creating some kind of new job
> class (outside from kdecore), that inherits KJob, and that is the one
> that is supposed to be inherited by jobs that want to be shown on the
> uiserver.

Too much inheritance. What if I want a composite job to be "observeable" too?
I need to inherit from KCompositeJob and I need to inherit from ObservableJob,
this doesn't work. actionPerformed() isn't part of the basic architecture of a job
(like job vs compositejob), it's an add-on, so it should be designed as such.
Your previous idea of passing a slot name to addAction() worked for me
(especially with the job as the receiver).
But if others would prefer a more traditional approach then we need a signal
in kjob. Another idea would be a separate action class, but I think that's overkill
for what's basically a slot. If Kevin doesn't like a signal in kjob (which I can
understand), then I would recommend to keep the "passing a slot name to
Observer::addAction" approach.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list