Enhancement: KLineBufferedProcess

Rolf Eike Beer kde at opensource.sf-tec.de
Tue Mar 11 23:07:20 GMT 2008


Oswald Buddenhagen wrote:
> On Fri, Mar 07, 2008 at 04:13:40PM +0100, Rolf Eike Beer wrote:
> > The idea behind this class is to receive the data from the process and
> > buffer it. A signal is emitted only if a complete line of data is
> > available.
>
> fwiw, in qt 4.4, the combination of kprocess + qtextstream should work
> reliably.

Well, that would not help anyone who could find arbitrary 8 bit characters in 
the output so he needs the result as a QByteArray. For the GPG output I 
should be able to write a QTextCodec that handles this stuff. Thanks for the 
hint.

Nevertheless I have attached a version that actually works (tested with KGpg). 
The other one was a bit hacky since the people at the booth confused me ;)

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: klineprocess.cpp
Type: text/x-c++src
Size: 3430 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080312/3edb5467/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: klineprocess.h
Type: text/x-c++hdr
Size: 4260 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080312/3edb5467/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080312/3edb5467/attachment.sig>


More information about the kde-core-devel mailing list