From a22254860f01256de3acdcd799c8fe6e1f8e0f0e Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 3 Sep 2023 14:31:35 +0400 Subject: [PATCH] Revert "Use glib to open URLs on Linux" This reverts commit a7117df837db39e8d2e4590dd6b0434415f79264. --- ui/basic_click_handlers.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/ui/basic_click_handlers.cpp b/ui/basic_click_handlers.cpp index c68fbd5..91e52e7 100644 --- a/ui/basic_click_handlers.cpp +++ b/ui/basic_click_handlers.cpp @@ -11,17 +11,12 @@ #include "ui/integration.h" #include "base/qthelp_url.h" #include "base/qt/qt_string_view.h" -#include "base/platform/linux/base_linux_app_launch_context.h" #include #include #include #include -#if __has_include() -#include -#endif // __has_include() - QString TextClickHandler::readable() const { const auto result = url(); return !result.startsWith(qstr("internal:")) @@ -85,26 +80,6 @@ void UrlClickHandler::Open(QString url, QVariant context) { if (IsEmail(url)) { url = "mailto: " + url; } -#if __has_include() - // Desktop entry spec implementation, - // prefer it over QDesktopServices::openUrl since it just calls - // the xdg-open shell script that is known to be bugged: - // various shell-specific bugs with spaces in paths, - // logic bugs violating the spec and etc, etc. - // Not to mention xdg-open can and will use DE-specific executables - // that allows various ill people to develop extensions - // to the standard and differ the behavior across apps. - // https://specifications.freedesktop.org/desktop-entry-spec/latest/ - { - using namespace gi::repository; - if (Gio::AppInfo::launch_default_for_uri( - url.toStdString(), - base::Platform::AppLaunchContext(), - nullptr)) { - return; - } - } -#endif // __has_include() QDesktopServices::openUrl(url); } }