KEditToolBar ported to KProcess

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Wed Jun 13 11:53:06 BST 2007


Von: Oswald Buddenhagen <ossi at kde.org>
> On Tue, Jun 12, 2007 at 07:17:26PM +0200, Andreas Pakulat wrote:
> > +++ kedittoolbar.cpp	(Arbeitskopie)
> > -  if ( !m_kdialogProcess->start( K3Process::NotifyOnExit ) ) {
> > +  m_kdialogProcess->setOutputChannelMode(KProcess::MergedChannels);
> >
> this is no equivalent transformation. nothing in the original code
> suggests that the channels are supposed to be merged. OnlyStdoutChannel
> seems right.
> 
> > -       m_kdialogProcess->readln(icon, true) <= 0 ) {
> > +  icon = QString::fromLocal8Bit(
> m_kdialogProcess->readAllStandardOutput() );
> > +  icon = icon.left( icon.indexOf( "\n" ) );
> >
> use
>   icon = QString::fromLocal8Bit( m_kdialogProcess->readLine() );
> or (if you like overkill):
>   QTextStream t(m_kdialogProcess);
>   icon t.readLine();
> (stdout is the default read channel).
> 
> fwiw, there is no hurry with porting away from k3process - unless your
> os comes from redmond. >8=)
I'll keep this in mind when I add/change something platform specific and break unix compile... :-(

Christian
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger




More information about the kde-core-devel mailing list