Need a general point of view about jobs

Olivier Goffart ogoffart at kde.org
Thu Jan 25 22:56:22 GMT 2007


Le jeudi 25 janvier 2007 23:15, Rafael Fernández López a écrit :
> Okay, to solve the (Fact), 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. For example:
[...]
> So in the first class template, we could provide the job the power to
> connect that signal wherever the coder wants (for example, some slot
> on the main program). The others, are pretty good organized, since all
> that is related to jobs, is done on the job itself, not outside.

I prefer the first template (with the signal)

in KNotification, what i did is

signals:
  activated (unsigned int action)
  action1Activated ()
  action2Activated ()
  action3Activated ()

> That is the main reason, making the new class that the coder writes
> (inheriting ObservableJob) more organized, since no code related to
> the job goes "outside" of that class, and that will end up on a very
> more organized code at the end.
>
> If agreed, the question is: where could we put this new class ?

kdecore/jobs ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070125/048029c7/attachment.sig>


More information about the kde-core-devel mailing list