From: akl Date: Thu, 13 Sep 2007 08:35:23 +0000 (+0000) Subject: IPAL16919 (Wrong "Warning" appears after closing of dlg to select profile of the... X-Git-Tag: T_24092007~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0fce3375a851e41fca79eedd5c20b8df74a185a5;p=modules%2Fgui.git IPAL16919 (Wrong "Warning" appears after closing of dlg to select profile of the browser to show docs): - QString aCommand; - aCommand.sprintf("%s %s %s",myApp.latin1(),myParams.latin1(),myHelpFile.latin1()); - myStatus = system(aCommand); + QProcess* proc = new QProcess(); + proc->addArgument( myApp ); + if (!myParams.isEmpty()) proc->addArgument( myParams ); + proc->addArgument( myHelpFile ); + myStatus = proc->start(); --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index fd1f8977b..fad300901 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -59,6 +59,7 @@ #include #include #include +#include #include #include @@ -923,20 +924,22 @@ public: #else myHelpFile("file:" + theHelpFile + theContext), #endif - myStatus(0), + myStatus(false), myLApp( app ) { }; virtual void run() { - QString aCommand; - if ( !myApp.isEmpty()) { - aCommand.sprintf("%s %s %s",myApp.latin1(),myParams.latin1(),myHelpFile.latin1()); - myStatus = system(aCommand); - if(myStatus != 0) + QProcess* proc = new QProcess(); + proc->addArgument( myApp ); + if (!myParams.isEmpty()) proc->addArgument( myParams ); + proc->addArgument( myHelpFile ); + myStatus = proc->start(); + + if(!myStatus) { QCustomEvent* ce2000 = new QCustomEvent( 2000 ); QString* msg = new QString( QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").arg(myApp).arg(myHelpFile) ); @@ -950,7 +953,7 @@ private: QString myApp; QString myParams; QString myHelpFile; - int myStatus; + bool myStatus; LightApp_Application* myLApp; };