From 13e59e27ebd515da2baca8e4dd7ebba76f601643 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 19 Sep 2022 05:25:40 +0400 Subject: [PATCH] Remove unnecessary Q_OS_UNIX && !Q_OS_MAC check Thanks to cmake_dependent_option --- ui/basic_click_handlers.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/basic_click_handlers.cpp b/ui/basic_click_handlers.cpp index 33624ea..b7bf0b9 100644 --- a/ui/basic_click_handlers.cpp +++ b/ui/basic_click_handlers.cpp @@ -12,18 +12,18 @@ #include "base/qthelp_url.h" #include "base/qt/qt_string_view.h" -#if defined Q_OS_UNIX && !defined Q_OS_MAC && !defined DESKTOP_APP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION #include "base/platform/linux/base_linux_app_launch_context.h" -#endif // Q_OS_UNIX && !Q_OS_MAC && !DESKTOP_APP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION #include #include #include #include -#if defined Q_OS_UNIX && !defined Q_OS_MAC && !defined DESKTOP_APP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION #include -#endif // Q_OS_UNIX && !Q_OS_MAC && !DESKTOP_APP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION QString TextClickHandler::readable() const { const auto result = url(); @@ -88,7 +88,7 @@ void UrlClickHandler::Open(QString url, QVariant context) { if (IsEmail(url)) { url = "mailto: " + url; } -#if defined Q_OS_UNIX && !defined Q_OS_MAC && !defined DESKTOP_APP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION // Desktop entry spec implementation, // prefer it over QDesktopServices::openUrl since it just calls // the xdg-open shell script that is known to be bugged: @@ -106,7 +106,7 @@ void UrlClickHandler::Open(QString url, QVariant context) { } } catch (...) { } -#endif // Q_OS_UNIX && !Q_OS_MAC && !DESKTOP_APP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION QDesktopServices::openUrl(url); } }