Use Qt4.2 openUrl to show manual
[mussa.git] / qui / MussaWindow.cpp
index 162598487cd68778d9a57a0fa5d9e8efb26f26a8..58fea508458d23fe3fdc975c42de47bff58ce8de 100644 (file)
@@ -1,4 +1,3 @@
-#include "py/python.hpp"
 #include "qui/MussaWindow.hpp"
 #include "mussa_exceptions.hpp"
 #include "version.hpp"
@@ -7,6 +6,7 @@
 #include <QApplication>
 #include <QAssistantClient>
 #include <QCloseEvent>
+#include <QDesktopServices>
 #include <QDir>
 #include <QFileDialog>
 #include <QHBoxLayout>
@@ -17,6 +17,7 @@
 #include <QStatusBar>
 #include <QString>
 #include <QStringList>
+#include <QUrl>
 #include <QWhatsThis>
 
 #include <memory>
@@ -649,11 +650,8 @@ void MussaWindow::showManual()
                          QMessageBox::NoButton);
   }
 #else
-  try {
-    boost::python::object webopen = get_py()["webbrowser.open"];
-    webopen("http://woldlab.caltech.edu/~king/mussagl_manual/");
-  } catch( boost::python::error_already_set ) {
-    PyErr_Print();
+  QUrl manual_url("http://woldlab.caltech.edu/~king/mussagl_manual/");
+  if (not QDesktopServices::openUrl(manual_url)) {
     QMessageBox::warning(this,
                          tr("Mussa Help Error"),
                          tr("Unable to launch webbrowser"),