From d77eed84982a34d27d65f2ab61318237df0398ac Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 4 Oct 2018 17:56:20 +0300 Subject: [PATCH] Use default system Browser for help --- src/XGUI/XGUI_Workshop.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) 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); } } } -- 2.39.2