QProcess vs K3Process
hausmann at kde.org
Mon May 28 17:04:49 BST 2007
On Monday 28 May 2007 17:12:48 Oswald Buddenhagen wrote:
> 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*
> franky, i don't think we *lose* anything if i add the ~20 loc to
> kprocess. :)
I agree, there's surely nothing to loose. I merely wanted to point out that it
is very well possible to set individual environment variables with QProcess
and it's not /terribly/ difficult either.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part.
More information about the kde-core-devel