From 2512fcd7cb781e2fc7792412d34849dd9bfac333 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Wed, 23 Mar 2022 12:00:35 +0100 Subject: [PATCH] Qassistant retirement: Added GIL lock --- src/Gui/MainWindow.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 8a7563d437..7522e1054a 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -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);