| 9 |
|
|
| 10 |
|
void XmlProcessor::run() |
| 11 |
|
{ |
| 12 |
< |
QProcess *myProcess = new QProcess(); |
| 12 |
> |
QProcess myProcess; |
| 13 |
|
QString result = QString(); |
| 14 |
|
QString errorMessage = ""; |
| 15 |
|
int numErrors=0; |
| 16 |
|
|
| 17 |
< |
myProcess->setWorkingDirectory(this->AppDir); |
| 17 |
> |
myProcess.setWorkingDirectory(this->AppDir); |
| 18 |
|
|
| 19 |
|
for(int i=0; i<this->commands->size(); i++){ |
| 20 |
|
|
| 21 |
< |
myProcess->start(Util::getXmlToolsExeName() +" "+this->commands->at(i)); |
| 22 |
< |
myProcess->waitForFinished(-1); |
| 23 |
< |
result=myProcess->readAllStandardError(); |
| 21 |
> |
myProcess.start(UtilVago::getXmlToolsExeAbsolutePath() +" "+this->commands->at(i)); |
| 22 |
> |
myProcess.waitForFinished(-1); |
| 23 |
> |
result=myProcess.readAllStandardError(); |
| 24 |
|
|
| 25 |
|
if(!result.isEmpty()){ |
| 26 |
|
//catch exception |
| 31 |
|
|
| 32 |
|
} |
| 33 |
|
|
| 34 |
– |
delete myProcess; //delete object and make pointer invalid |
| 34 |
|
this->commands->clear(); //clean list |
| 35 |
|
|
| 36 |
|
//let's cut it a bit, complete error is in log file. |