]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Use default system Browser for help
authorvsv <vsv@opencascade.com>
Thu, 4 Oct 2018 14:56:20 +0000 (17:56 +0300)
committervsv <vsv@opencascade.com>
Thu, 4 Oct 2018 14:56:38 +0000 (17:56 +0300)
src/XGUI/XGUI_Workshop.cpp

index 378ffae70397c2de2580c8b84125952b03dd8781..8a73756f2b9bb5c0ebfa7c2f1b3dd2d71145c642 100755 (executable)
 #include <QAction>
 #include <QDesktopWidget>
 #include <QProcess>
+#include <QDesktopServices>
 
 #include <iterator>
 
@@ -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);
         }
       }
     }