Runcontroller KJobs question

Evgeniy Ivanov pfx.kde at gmail.com
Tue Feb 17 20:32:58 UTC 2009


Hi,

On Tue February 17 2009 23:25:24 Vladimir Prus wrote:
> 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
>

I don't remember exactly, but AFAIK both finished() and emitResult() should be 
emitted. See comments in VcsJob class: there should be an explanation in one 
of several cases of usage.

-- 
Best regards, Evgeniy.
Key Fingerprint: F316B5A1F6D2054FCD18B74A95400ABB1FE567A3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090217/5f3f214d/attachment.sig>


More information about the KDevelop-devel mailing list