Suggesting another little improvement for KJob class
Ricard Marxer Piñón
rmarxer at iua.upf.edu
Wed Feb 7 21:53:18 GMT 2007
Rafael Fernández López wrote:
> Hi Ricard,
>
> error() method is already implemented in KJob class, but it is not
> enough when the state of the job changes before finishing :).
>
> Hmm... I don't know if separate methods are better. I meant having an
> enum for following the capabilities methods, and because from my point
> of view is easier to maintain and expand.
Yes, maybe it's true that it's much clearer as states, it makes no sense
asking if it has finished, it is paused or it has started to know it's
state.
But I think it would be interesting to separate to groups of states:
- states about the temporal progress ("notstarted", "started",
"waiting", "paused", "finished")
But I think as you said, that a job error can happen during any of the
states above mentioned, so I don't think it's worth duplicating the
amount of states.
What do you think about the "waiting" state? I was thinking it could
represent situations where user input is required.
I guess a bit of work is required in defining the different type of
errors (notifications, warnings and errors).
>
> Bye,
> Rafael Fernández López.
PS: sorry for having my computer time wrong, I think it's fixed now
More information about the kde-core-devel
mailing list