KProcess Line Mode Patch
apaku at gmx.de
Mon Dec 1 15:12:03 GMT 2008
On 01.12.08 12:32:08, Ralf Habacker wrote:
> 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
> 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 ?
Thiago and Ossi already commented on all the technical problems and wether
this is really so much needed. Sure having some line-splitting in kdelibs
might be good, but splitting a QByteArray at '\n' and returning the lines +
"rest" is a simple function in a namespace (or working on QString instead)
no need to fiddle around with delimiters, encodings and so on on a KProcess
So -1 from me.
Tomorrow will be cancelled due to lack of interest.
More information about the kde-core-devel