[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: kdeadmin/ksysv
From: Oswald Buddenhagen <ossi () kde ! org>
Date: 2003-07-22 9:01:14
[Download RAW message or body]
On Mon, Jul 21, 2003 at 06:26:54PM +0200, Toshitaka Fujioka wrote:
> CVS commit by fujioka:
>
> minor fix.
>
that's a minor optimization, not a minor fix. ;)
anyway, you did the same mistake i commented about two days ago:
calling fromLocal8Bit on separate chunks from kprocess is _evil_.
first concatenate, then split the lines and convert (the order of the
latter two does not matter; but it usually makes sense to convert a line
as soon as it becomes complete).
oh, fwiw, you don't need to zero-terminate the buffer from kprocess ...
it's not documented, but it appends a null-terminator for you. :)
> --- kdeadmin/ksysv/OldView.cpp #1.116:1.117
> @@ -695,5 +695,6 @@ void KSVContent::slotOutput( KProcess*,
> QCString buffer = QCString( _buffer, _buflen + 1 );
> buffer[_buflen]='\0';
> - appendLog( QString::fromLocal8Bit( buffer ), QString::fromLocal8Bit( buffer ) );
> + QString _str = QString::fromLocal8Bit( buffer );
> + appendLog( _str, _str );
> }
> }
greetings
--
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic