9#include <QDesktopServices>
13#include <QProcessEnvironment>
18constexpr const char *LDPRELOAD_ENV =
"LD_PRELOAD";
37 return QDesktopServices::openUrl(url);
40 auto systemEnv = QProcessEnvironment::systemEnvironment();
41 auto ldpreload = systemEnv.value(LDPRELOAD_ENV, QString());
42 if (!ldpreload.isEmpty()) {
43 unsetenv(LDPRELOAD_ENV);
45 auto status = QDesktopServices::openUrl(url);
46 if (!ldpreload.isEmpty()) {
47 setenv(LDPRELOAD_ENV, qPrintable(ldpreload), 1 );
65 QDesktopServices::setUrlHandler(scheme, receiver, method);
static void unsetUrlHandler(const QString &scheme)
Pass through method to MantidDesktopServices::unsetUrlHandler.
static bool openUrl(const QUrl &url)
Opens a url in the appropriate web browser.
static void setUrlHandler(const QString &scheme, QObject *receiver, const char *method)
Pass through method to MantidDesktopServices::setUrlHandler.