diff -r 36eb4b8f409e -r 1ad892c1a709 process.cpp --- a/process.cpp Thu Feb 25 11:03:52 2010 +0000 +++ b/process.cpp Tue Mar 02 13:59:19 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()<