Mantid
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
MantidQt::API::MantidDesktopServices Class Reference

This class provides a wrapper around QDesktopServices to fix a bug in opening URLs in firefox when tcmalloc is in the LD_PRELOAD environment variable on Linux. More...

#include <MantidDesktopServices.h>

Static Public Member Functions

static bool openUrl (const QString &url)
 
static bool openUrl (const QUrl &url)
 Opens a url in the appropriate web browser. More...
 
static void setUrlHandler (const QString &scheme, QObject *receiver, const char *method)
 Pass through method to MantidDesktopServices::setUrlHandler. More...
 
static void unsetUrlHandler (const QString &scheme)
 Pass through method to MantidDesktopServices::unsetUrlHandler. More...
 

Detailed Description

This class provides a wrapper around QDesktopServices to fix a bug in opening URLs in firefox when tcmalloc is in the LD_PRELOAD environment variable on Linux.

All other methods are simply passed through to QDesktopServices.

Definition at line 20 of file MantidDesktopServices.h.

Member Function Documentation

◆ openUrl() [1/2]

bool MantidQt::API::MantidDesktopServices::openUrl ( const QString &  url)
static

Definition at line 53 of file MantidDesktopServices.cpp.

References openUrl().

◆ openUrl() [2/2]

bool MantidQt::API::MantidDesktopServices::openUrl ( const QUrl &  url)
static

Opens a url in the appropriate web browser.

On Linux systems if LD_PRELOAD is defined as an environment variable then it is removed for the duration of the call to the web browser. This is to avoid known issues with LD_PRELOAD libraries and some web browsers, e.g. firefox. On all other systems the method simply passes through to QDesktopServies

Parameters
urlAddress to be opened

Definition at line 35 of file MantidDesktopServices.cpp.

Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::browserHelp(), MantidQt::MantidWidgets::CatalogSearch::helpClicked(), MantidQt::API::ScriptRepositoryView::helpClicked(), MantidQt::MantidWidgets::SequentialFitDialog::helpClicked(), MantidQt::MantidWidgets::UserFunctionDialog::helpClicked(), MantidQt::API::ScriptRepositoryView::openFolderLink(), openUrl(), MantidQt::MantidWidgets::MantidHelpWindow::openWebpage(), MantidQt::API::HelpWindow::showAlgorithm(), MantidQt::API::HelpWindow::showCustomInterface(), and MantidQt::API::InterfaceManager::showWebPage().

◆ setUrlHandler()

void MantidQt::API::MantidDesktopServices::setUrlHandler ( const QString &  scheme,
QObject *  receiver,
const char *  method 
)
static

Pass through method to MantidDesktopServices::setUrlHandler.

See Qt documentation for further details.

Parameters
schemeName of scheme to handle
receiverHandler object
methodMethod called on the receiver object

Definition at line 64 of file MantidDesktopServices.cpp.

◆ unsetUrlHandler()

void MantidQt::API::MantidDesktopServices::unsetUrlHandler ( const QString &  scheme)
static

Pass through method to MantidDesktopServices::unsetUrlHandler.

See Qt documentation for further details.

Parameters
schemeName of scheme to drop

Definition at line 74 of file MantidDesktopServices.cpp.


The documentation for this class was generated from the following files: