QProcess vs K3Process

Simon Hausmann hausmann at kde.org
Mon May 28 15:59:55 BST 2007


On Monday 28 May 2007 16:19:43 Andreas Pakulat wrote:
> On 28.05.07 14:26:41, Oswald Buddenhagen wrote:
> > On Mon, May 28, 2007 at 03:34:32AM +0200, Andreas Pakulat wrote:
> > > I'd like to know wether its better to port KDevelop4 to QProcess usage
> > > now or stick with K3Process until KProcess (as a QProcess subclass) is
> > > available.
> >
> > dunno. i could commit a basic KProcess today.
>
> What I was thinking of is, if KProcess goes into existence sometime with
> at least the features of K3Process that are commonly used (that is
> env-setting and the way of starting processes and adding the commands)
> we could avoid the 2 portings (now to QProcess and then to KProcess).
> OTOH Matt wants a port to QProcess rather sooner than later, so I guess
> I'll do the port. Also that will enable us to properly parse QProcess
> output wrt. lineendings.
>
> > this is a list of missing [KQ]Process features and differences between
> > qproc and k3proc. please comment on the desirability of the particular
> > points.
> >
> > - 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);


Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070528/dde09c09/attachment.sig>


More information about the kde-core-devel mailing list