ticket:120 ticket:49 ticket:98
Brandon figured out how to install QtAssistant on windows I haven't worked it
out for OS X or linux yet (as its noticeably harder).
I'd switched to using pythons webbrowser.open to go to our documentation
pages, except that only works if the python standard library is installed.
However windows lacks such a thing, and so the webbrowser.open code
wouldn't work.
This patch enables the QtAssistant for windows, and uses webbrowser.open
on OS X and Linux.
Also it'll actually open a warning messagebox if something goes wrong
trying to open the help, and display a not very useful error message.
TARGET_LINK_LIBRARIES(mussa_qui
mussa_core)
+# currently QTASSISTANT is only properly installed under windows
+IF(QT_QTASSISTANT_FOUND AND WIN32)
+ SET(QUI_CFLAGS "${QUI_CFLAGS} -DQT_QTASSISTANT_FOUND")
+ENDIF(QT_QTASSISTANT_FOUND AND WIN32)
+
SET_SOURCE_FILES_PROPERTIES(
${SOURCES}
PROPERTIES
void MussaWindow::showManual()
{
-#if QT_QTASSISTANT_FOUND
- manualAssistant->openAssistant();
+#if defined(QT_QTASSISTANT_FOUND)
+ if (manualAssistant) {
+ manualAssistant->openAssistant();
+ }
#else
try {
boost::python::object webopen = get_py()["webbrowser.open"];
webopen("http://woldlab.caltech.edu/~king/mussagl_manual/");
+ return;
} catch( boost::python::error_already_set ) {
PyErr_Print();
}
#endif //QT_QTASSISTANT_FOUND
+ QMessageBox::warning(this,
+ tr("Unhelpful Help"),
+ tr("Error loading help"),
+ QMessageBox::Ok,
+ QMessageBox::NoButton,
+ QMessageBox::NoButton);
}
void MussaWindow::assistantError(QString message)