[PATCH] KProcess port of khelpcenter

Ralf Habacker ralf.habacker at freenet.de
Thu Dec 20 19:14:16 GMT 2007


Oswald Buddenhagen schrieb:
> On Thu, Dec 20, 2007 at 06:59:37PM +0100, Ralf Habacker wrote:
>   
>> you probably mean [...]
>> no problem here :-)
>>
>>     
> you are looking into the apidoc of the wrong class. ;)
>   
i see, you mean this

    meinproc->setOutputChannelMode(KProcess::SeparateChannels);


This is a bit irritating because in the former I used QProcess and have  
learned a different behavior. It is partial not really clear when to use 
KProcess and when QProcess like the following case:

To be able to handle the finished signal i have to use QProcess related 
types in the signal definition like

    connect( meinproc, SIGNAL( finished( int, QProcess::ExitStatus) ),
             this, SLOT( meinprocExited( int, QProcess::ExitStatus) ) );

or

    connect( meinproc, SIGNAL( finished( int, QProcess::ExitStatus) ),
             this, SLOT( meinprocExited( int, KProcess::ExitStatus) ) );

both formats works.

If  i use the following

    connect( meinproc, SIGNAL( finished( int, KProcess::ExitStatus) ),
             this, SLOT( meinprocExited( int, KProcess::ExitStatus) ) );

it compiles but raises a "could not connect" runtime error.

Wouldn't it not better to add a  specific signal to KProcess to avoid 
such problems ?


Ralf






More information about the kde-core-devel mailing list