First of all: what is the difference between QProcess and KProcess? Which will we select to port the backends?
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 ?
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