Handling exit status in KJob
d82ks8djf82msd83hf8sc02lqb5gh5 at gmail.com
Sun Dec 1 19:46:32 UTC 2013
Dnia niedziela, 1 grudnia 2013 20:11:12 Milian Wolff pisze:
> On Sunday 01 December 2013 19:13:22 Maciej Poleski wrote:
> > Hi,
> > Some processes ends with exit code different than 0 and still we want to
> > consider this status as exit success. How to make KJob consider some
> > positive return code as success?
> A KJob has no notion of an exit code. So what exactly do you have in mind?
> You probably start some QProcess in a Job (which one?). Then, make sure to
> set some error status on the job class when the process fails.
I use DVcsJob to run bzr diff (to prepare diff as required for
IBasicVersionControl implementation). bzr diff (and also diff command in Unix)
returns 1 if there is a difference. But returning non 0 is interpreted as
failure somewhere in KDevelop thus I am unable to use this metod of prepering
diff for IBasicVersionControl.
The question is how to bypass this inconvenience?
There is a hard way - I probaby could subclass VcsJob and implement expected
behavior. But subclassing VcsJob for every method in interface (including kill
ability) is quite laborious.
More information about the KDevelop-devel