QProcess vs K3Process
apaku at gmx.de
Mon May 28 16:45:52 BST 2007
On 28.05.07 16:59:55, Simon Hausmann wrote:
> 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();
Well, normally in KDevelop you'll change existing env vars like PATH,
KDEDIRS, LD_LIBRARY_PATH and others. I can do this in KDevelops "execute
foo"-class manually but I'd really prefer a map instead of a stringlist
in (QK)Process because its just easier to handle.
Also can I assume that QProcess expands variables before executing the
application based on your statement? I didn't find anythin in QProcess
documentation about this (and I don't think I should need to lookup
exec() to find out wether it will expand variables or not)
Stay away from hurricanes for a while.
More information about the kde-core-devel