Runcontroller KJobs question

Vladimir Prus ghost at cs.msu.su
Tue Feb 17 20:25:24 UTC 2009


On Tuesday 17 February 2009 22:58:38 Andreas Pakulat wrote:
> On 17.02.09 20:56:07, Vladimir Prus wrote:
> > the runcontroller passes an KJob* to IRunProvider::execute. In case of 
> > debugger, I want to mark this job as done when debugger exits, either
> > normally or due to GDB crash. How can I do that, given that all
> > of KJob methods of interest are protected?
> 
> Well, at some point that job is created and that is most probably not a
> KJob, but  some subclass. That subclass should call emitResult() when
> its "done" and also set any errors via setError and setErrorText before
> that.

That is created in runcontroller.cpp and the actual class is RunJob and IRunProvider
is not in position to intercept construction of that class. 

But I've already found the right way -- it appears that if IRunProvider implementatation
has a finished(KJob*) signal, it will be used. Of course, this is not documented anywhere :-P

- Volodya




More information about the KDevelop-devel mailing list