1 #include "vymprocess.h"
9 /////////////////////////////////////////////////////////////////
11 /////////////////////////////////////////////////////////////////
12 VymProcess::VymProcess()
14 connect( this, SIGNAL(readyReadStandardError()),
15 this, SLOT(readProcErrout()) );
16 connect( this, SIGNAL(readyReadStandardOutput()),
17 this, SLOT(readProcStdout()) );
21 VymProcess::~VymProcess()
25 void VymProcess::clear()
31 void VymProcess::runScript(QString spath, QString fpath)
33 spath.replace ("%f",fpath);
34 QStringList args=spath.split (' ');
35 spath=args.takeFirst();
38 qDebug()<<"Process::runScript : " + spath+" "+args.join(" ");
41 if (!waitForStarted() )
43 QMessageBox::critical( 0, tr( "Critical Error" ),
44 tr("Could not start %1").arg(spath) );
47 if (!waitForFinished())
48 QMessageBox::critical( 0, tr( "Critical Error" ),
49 tr("%1 didn't exit normally").arg(spath) +
52 // if (exitStatus()>0) showOutput=true;
55 /* TODO output for Process::runScript
56 qDebug()<<readAllStandardOutput();
57 qDebug()<<getStdout();
58 qDebug()<<getErrout();
60 addOutput (getErrout());
61 addOutput (getStdout());
65 void VymProcess::readProcErrout()
67 errOut+=readAllStandardError();
70 void VymProcess::readProcStdout()
72 stdOut+=readAllStandardOutput();
75 QString VymProcess::getErrout()
80 QString VymProcess::getStdout()