QProcess or KProcess?
Closed, ResolvedPublic

Description

First of all: what is the difference between QProcess and KProcess? Which will we select to port the backends?

filipesaraiva moved this task from Backlog to To-Do on the Cantor board.May 13 2017, 6:20 PM

QProcess and KProcess are not very different. KProcess just extends QProcess by adding some extra functionality and overriding some of the QProcess functions.
A few of the extra functionalities offered by KProcess:

  • overloaded the operator "<<" that lets users add command line arguments , the same can be achieved using QProcess using QProcess::setArguments()
  • KProcess::execute() which is the equivalent of sequence QProcess::start() and waitForFinished()

They both are well supported on major Operating Systems(windows, Linux, FreeBSD, MacOSX).

IMO, QProcess will be sufficient for needs. What do you think ?

filipesaraiva moved this task from To-Do to Work in Progress on the Cantor board.May 22 2017, 9:40 PM

Currently we are using KProcess in Scilab and Octave backends.

I think you can try QProcess right now to port some backend (like Qalculate) and test if this library is enough for us.

Or maybe, could you try port Scilab backend to QProcess? This way we can see if this approach cover our needs.

So, I decided to port Scilab to QProcess and see if everything works fine. Porting was not difficult as most of the functions of KProcess library used by Scilab are same in QProcess. I tested it against several commands including Plot commands, and everything worked fine.

I have attached the patch file. Please have a look
If everything looks good to you, I will move ahead and start the port of Qalculate

I opened T6211 just to track the port of Scilab backend to QProcess. Next time you can upload patches to Differential.

filipesaraiva moved this task from Work in Progress to Done on the Cantor board.May 26 2017, 3:34 PM

Nice!

I accepted T6211, so go ahead and let's port the backends to QProcess :)