diff --git a/src/Doc/CMakeLists.txt b/src/Doc/CMakeLists.txt index 8814adc3de..3649ed4dd0 100644 --- a/src/Doc/CMakeLists.txt +++ b/src/Doc/CMakeLists.txt @@ -6,31 +6,7 @@ configure_file(LICENSE.html configure_file(CONTRIBUTORS ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DOCDIR}/CONTRIBUTORS COPYONLY) - - -if(BUILD_GUI) - FILE(GLOB QCH_FILES freecad.qch.part*) - list(SORT QCH_FILES) - set (DEST_FILE ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DOCDIR}/freecad.qch) - foreach(SRC_FILE ${QCH_FILES}) - if(${SRC_FILE} IS_NEWER_THAN ${DEST_FILE}) - EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/catfiles.py - --outputfile=${DEST_FILE} ${QCH_FILES} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_STRIP_TRAILING_WHITESPACE) - break() - endif() - endforeach() - - configure_file(freecad.qhc ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DOCDIR}/freecad.qhc COPYONLY) - INSTALL(FILES - ${DEST_FILE} - DESTINATION ${CMAKE_INSTALL_DOCDIR} - ) -endif(BUILD_GUI) - INSTALL(FILES - freecad.qhc ThirdPartyLibraries.html LICENSE.html CONTRIBUTORS diff --git a/src/Doc/freecad.qch.part00 b/src/Doc/freecad.qch.part00 deleted file mode 100644 index 5e40f2109c..0000000000 Binary files a/src/Doc/freecad.qch.part00 and /dev/null differ diff --git a/src/Doc/freecad.qch.part01 b/src/Doc/freecad.qch.part01 deleted file mode 100644 index 0ddcfe3f98..0000000000 Binary files a/src/Doc/freecad.qch.part01 and /dev/null differ diff --git a/src/Doc/freecad.qch.part02 b/src/Doc/freecad.qch.part02 deleted file mode 100644 index 54a5aec3f7..0000000000 Binary files a/src/Doc/freecad.qch.part02 and /dev/null differ diff --git a/src/Doc/freecad.qch.part03 b/src/Doc/freecad.qch.part03 deleted file mode 100644 index 28acda59c0..0000000000 Binary files a/src/Doc/freecad.qch.part03 and /dev/null differ diff --git a/src/Doc/freecad.qch.part04 b/src/Doc/freecad.qch.part04 deleted file mode 100644 index 337f6a1308..0000000000 Binary files a/src/Doc/freecad.qch.part04 and /dev/null differ diff --git a/src/Doc/freecad.qhc b/src/Doc/freecad.qhc deleted file mode 100644 index 925fd07dce..0000000000 Binary files a/src/Doc/freecad.qhc and /dev/null differ diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 97b7e436b4..da07ab1b9a 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -692,18 +692,20 @@ void MainWindow::whatsThis() void MainWindow::showDocumentation(const QString& help) { - // temporary - allows to enable/disable the use of the Help module - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Help"); - bool useHelpModule = hGrp->GetBool("UseHelpModule", false); - if (useHelpModule) { + Base::PyGILStateLocker lock; + PyObject* module = PyImport_ImportModule("Help"); + if (module) { + Py_DECREF(module); Gui::Command::addModule(Gui::Command::Gui,"Help"); Gui::Command::doCommand(Gui::Command::Gui,"Help.show(\"%s\")", help.toStdString().c_str()); - } else { + } + else { + PyErr_Clear(); QUrl url(help); if (url.scheme().isEmpty()) { - QString page; - page = QString::fromUtf8("%1.html").arg(help); - d->assistant->showDocumentation(page); + QMessageBox::critical(getMainWindow(), tr("Help addon needed!"), + tr("The Help system of %s is now handled by the \"Help\" addon. " + "Install it with menu Tools > Addons Manager"),qApp->applicationName()); } else { QDesktopServices::openUrl(url);