From: vsv Date: Thu, 4 Oct 2018 14:56:20 +0000 (+0300) Subject: Use default system Browser for help X-Git-Tag: CEA_2018-2~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d77eed84982a34d27d65f2ab61318237df0398ac;p=modules%2Fshaper.git Use default system Browser for help --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 378ffae70..8a73756f2 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -136,6 +136,7 @@ #include #include #include +#include #include @@ -596,14 +597,14 @@ void XGUI_Workshop::onHelpActionClicked() if (!aHelpPage.isEmpty()) { QString aDocDir; const QChar aSep = QDir::separator(); - QString platform; - SUIT_ResourceMgr* aResMgr = ModuleBase_Preferences::resourceMgr(); -#ifdef WIN32 - platform = "winapplication"; -#else - platform = "application"; -#endif - QString aBrowserName = aResMgr->stringValue("ExternalBrowser", platform); +// QString platform; +// SUIT_ResourceMgr* aResMgr = ModuleBase_Preferences::resourceMgr(); +//#ifdef WIN32 +// platform = "winapplication"; +//#else +// platform = "application"; +//#endif +// QString aBrowserName = aResMgr->stringValue("ExternalBrowser", platform); #ifdef HAVE_SALOME QString aDir(getenv("SHAPER_ROOT_DIR")); @@ -617,9 +618,8 @@ void XGUI_Workshop::onHelpActionClicked() #endif QString aFileName = aDocDir + aSep + aHelpPage; if (QFile::exists(aFileName)) { - QStringList aParams; - aParams << aFileName; - QProcess::startDetached(aBrowserName, aParams); + QUrl aUrl = QUrl::fromLocalFile(aFileName); + QDesktopServices::openUrl(aUrl); } } }