Qassistant retirement: Added GIL lock
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user