QProcess vs K3Process

Oswald Buddenhagen ossi at kde.org
Mon May 28 16:12:48 BST 2007


On Mon, May 28, 2007 at 04:59:55PM +0200, Simon Hausmann wrote:
> On Monday 28 May 2007 16:19:43 Andreas Pakulat wrote:
> > On 28.05.07 14:26:41, Oswald Buddenhagen wrote:
> > > - qproc does not allow setting individual env vars, only the entire
> > >   environment. pretty inconvenient, if you ask me. can be easily
> > >   implemented in kproc.
> >
> > Yes, thats something I'd like to have again.
> 
> You can achieve this simply using
> 
> QProcess proc = ...
> 
> QStringList env = QProcess::systemEnvironment();
> env.append("FOO=bar");
> proc.setEnvironment(env);
> 
QProcess isn't particularly clever about removing duplicates or
eliminating zero assignments alltogether. also, the api isn't *too*
convenient.
franky, i don't think we *lose* anything if i add the ~20 loc to
kprocess. :)

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.




More information about the kde-core-devel mailing list