KProcess Line Mode Patch

Ralf Habacker ralf.habacker at
Mon Dec 1 11:32:08 GMT 2008


based on the work described on 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);

2.There are new KProcess signals available which indicates available lines.

    void readyReadLineStandardOutput();
    void readyReadLineStandardError();

3. The lines could be fetched with

    QStringList &readLinesStandardOutput(QStringList &out=QStringList());
    QStringList &readLinesStandardError(QStringList &out=QStringList());

4. non standard line delimiters could be set by

    void setOutputLineDelimiter(QString &delim=QString());

Any comments or objections ?



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kprocess-output-linemode.patch
URL: <>

More information about the kde-core-devel mailing list