// QT Includes
#include <qstring.h>
#include <qfileinfo.h>
+#include <qprocess.h>
// VTK Includes
#include <vtkRenderer.h>
aFileName = SALOMEDS_Tool::GetNameFromPath(aStudy->URL()) + aFileName;
std::ostringstream aStream;
- aStream<<"cp "<<aFile<<" "<<aTmpDir<<aFileName;
+ aStream<<"cp "<<aFile<<" "<<aTmpDir<<aFileName;
std::string aCommand = aStream.str();
- if(system(aCommand.c_str()) != 0){
- INFOS("VISU_Gen_i::Save - Cann't execute the command :"<<aCommand);
+
+ QString comm = QDir::convertSeparators( QString(aCommand.c_str()) );
+ const char* cp = comm.latin1();
+
+
+ QProcess* proc = new QProcess();
+ proc->addArgument( comm );
+ if(!proc->start())
+ {
+ INFOS("VISU_Gen_i::Save - Cann't execute the command :"<<aCommand);
continue;
- }
+ }
+
+ //if(system(aCommand.c_str()) != 0){
+ // INFOS("VISU_Gen_i::Save - Cann't execute the command :"<<aCommand);
+ // continue;
+ //}
}
aFileNames.push_back(aFileName);
aFiles.push_back(aFile);
static QString aCommand;
aCommand.sprintf("cp %s %s%s",aFileInfo.filePath().latin1(),aTmpDir.ToCString(),aFileName.latin1());
- int aRes = system(aCommand);
- if(aRes){
- if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - Can't execute the command :"<<aCommand);
+ QString comm = QDir::convertSeparators( aCommand );
+
+ QProcess* proc = new QProcess();
+ proc->addArgument( comm );
+ if(!proc->start())
+ {
+ if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - Can't execute the command :"<<aCommand);
continue;
- }else
+ }
+ else
if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - "<<aCommand);
+ //int aRes = system(aCommand);
+ //if(aRes){
+ // if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - Can't execute the command :"<<aCommand);
+ // continue;
+ //}else
+ // if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - "<<aCommand);
TCollection_AsciiString aString((char *)(aFileName.latin1()));