diff -r 69a4c16bd85b -r 988f1908a7c4 process.cpp --- a/process.cpp Mon Feb 19 12:01:52 2007 +0000 +++ b/process.cpp Fri Jul 23 16:43:49 2010 +0000 @@ -1,5 +1,10 @@ #include "process.h" +#include +#include + +extern bool debug; + ///////////////////////////////////////////////////////////////// // Process ///////////////////////////////////////////////////////////////// @@ -22,6 +27,40 @@ stdOut=""; } +void Process::runScript(QString spath, QString fpath) +{ + spath.replace ("%f",fpath); + QStringList args=QStringList::split (' ',spath,false); + spath=args.takeFirst(); + + if (debug) + qDebug()<<"Process::runScript : " + spath+" "+args.join(" "); + + start (spath,args); + if (!waitForStarted() ) + { + QMessageBox::critical( 0, tr( "Critical Error" ), + tr("Could not start %1").arg(spath) ); + } else + { + if (!waitForFinished()) + QMessageBox::critical( 0, tr( "Critical Error" ), + tr("%1 didn't exit normally").arg(spath) + + getErrout() ); + // else + // if (exitStatus()>0) showOutput=true; + + } + /* FIXME-3 output for Process::runScript + qDebug()<