KProcess Line Mode Patch

Ingo Klöcker kloecker at kde.org
Mon Dec 1 20:41:41 GMT 2008


On Monday 01 December 2008, Ralf Habacker wrote:
> Hi,
>
> based on the work described on
> http://lists.kde.org/?l=kde-core-devel&m=120522889930459&w=2 there is
> a patch appended which implements a line buffering mode directly in
> KProcess. The advantage of this approach is that this feature is
> directly available from kdecore and therefore no additional class
> located somewhere in the related package source is required.
>
>  How it works:
>
> 1.Line buffering mode ist enabled with the
>
>     void setOutputLineMode(bool mode);

Just a general advice that came to my mind while reading your message:

The name of a method taking a bool parameter should clearly convey the 
meaning of passing true/false to the method.

setOutputLineMode( bool mode ) fails to convey this meaning.

This method should rather be named enableOutputLineMode( bool enable ) 
or be replaced by a more general setOutputMode( OutputMode mode ).


Regards,
Ingo
-------------- 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/kde-core-devel/attachments/20081201/ab63a7f7/attachment.sig>


More information about the kde-core-devel mailing list