broken KProcess in HEAD

Gav Wood gav at
Sat Jul 19 16:31:01 BST 2003

> fwiw, we're talking about kopete/protocols/sms/services/smsclient.cpp,
> right? a few notes then ...

first of all, it's not my code; i'm just hacking on it :-)

> - connecting to processExited for a blocking process is relatively
>   pointless. you can call the relevant functions after start() returns.
>   i plan to make kprocess not emit this signal for blocking processes
>   any more in kde 4.

this has since been changed to a notifyOnExit or whatever.

> - the way you collect output is relatively broken. you fromLocal8Bit
>   every chunk separately - this will break if the program emits lots of
>   utf8. you have to accumulate first and then do the conversion and split
>   the lines.
>   another thing i dislike is the fact, that stdin and stdout are
>   different handles but are collected into the same buffer. this can
>   potentially lead to oddly multiplexed contents ... anyway, kprocio
>   makes the same mistake - i think i'll have to take care of this.

hmm.. might be worth a cleanup in the not too distcnt future.

> - you are leaking the kprocess

again should be more or less fixed. is there a clean way to delete the 
instance once the process has exited or it is ok to "delete p" from the slot 
that handles the signal processExitted(KProcess *p)?

> - wth is QString("%1:%2").arg("SMSClient").arg("ProviderName") supposed
>   to be good for? i can hardly think of a more complicated way to code
>   it ... ;)

not my code, your honour :-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <>

More information about the kde-core-devel mailing list