1 #include "vymprocess.h"
9 /////////////////////////////////////////////////////////////////
11 /////////////////////////////////////////////////////////////////
12 VymProcess::VymProcess()
14 connect(this, SIGNAL(readyReadStandardError()), this,
15 SLOT(readProcErrout()));
16 connect(this, SIGNAL(readyReadStandardOutput()), this,
17 SLOT(readProcStdout()));
21 VymProcess::~VymProcess() {}
23 void VymProcess::clear()
29 void VymProcess::runScript(QString spath, QString fpath)
31 spath.replace("%f", fpath);
32 QStringList args = spath.split(' ');
33 spath = args.takeFirst();
36 qDebug() << "Process::runScript : " + spath + " " + args.join(" ");
39 if (!waitForStarted()) {
40 QMessageBox::critical(0, tr("Critical Error"),
41 tr("Could not start %1").arg(spath));
44 if (!waitForFinished())
45 QMessageBox::critical(0, tr("Critical Error"),
46 tr("%1 didn't exit normally").arg(spath) +
49 // if (exitStatus()>0) showOutput=true;
51 /* TODO output for Process::runScript
52 qDebug()<<readAllStandardOutput();
53 qDebug()<<getStdout();
54 qDebug()<<getErrout();
56 addOutput (getErrout());
57 addOutput (getStdout());
61 void VymProcess::readProcErrout() { errOut += readAllStandardError(); }
63 void VymProcess::readProcStdout() { stdOut += readAllStandardOutput(); }
65 QString VymProcess::getErrout() { return errOut; }
67 QString VymProcess::getStdout() { return stdOut; }