[PATCH] KProcess port of khelpcenter

Ralf Habacker ralf.habacker at freenet.de
Fri Dec 14 19:52:46 GMT 2007

Oswald Buddenhagen schrieb:
> On Fri, Dec 14, 2007 at 08:18:43PM +0100, Ralf Habacker wrote:
>> Oswald Buddenhagen schrieb:
>>> On Fri, Dec 14, 2007 at 07:56:40PM +0100, Ralf Habacker wrote:
>>>> +	m_meinproc->start();
>>>> +	m_meinproc->waitForStarted();
>>> of course i expect the code to actually examine the return value from
>>> waitForStarted and make something useful with it, otherwise there is no
>>> point in calling it. ;)
>> All error handling is done in meinprocExited( int exitCode, 
>> QProcess::ExitStatus exitStatus), isn't this enough ?
> unless i'm severely misreading the doc, finished() is never emitted if
> started() was not emitted before. and that is emitted only upon success
> to start. so if you want/need to handle failure to start up
> asynchronously, connect to error().
thanks for this pointer. I think asynchronously handling isn't required: 
I would add the following code to indicate in the log that there is an 

    if (!m_meinproc->waitForStarted(1000)) {
        kDebug() << "could not start process" << m_meinproc->program();
       delete m_meinproc;

BTW: Do you have any suggestion about the required timeout on non win32 
platforms ?


More information about the kde-core-devel mailing list