Qassistant retirement: Added GIL lock

This commit is contained in:
Yorik van Havre
2022-03-23 12:00:35 +01:00
parent e0e4bf1810
commit d05974b486

View File

@@ -692,6 +692,7 @@ void MainWindow::whatsThis()
void MainWindow::showDocumentation(const QString& help)
{
Base::PyGILStateLocker lock;
PyObject* module = PyImport_ImportModule("Help");
if (module) {
Gui::Command::addModule(Gui::Command::Gui,"Help");
@@ -701,11 +702,9 @@ void MainWindow::showDocumentation(const QString& help)
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());
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);