Remove unnecessary Q_OS_UNIX && !Q_OS_MAC check

Thanks to cmake_dependent_option
This commit is contained in:
Ilya Fedin 2022-09-19 05:25:40 +04:00 committed by John Preston
parent 367859c684
commit 13e59e27eb

View file

@ -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 <QtCore/QUrl>
#include <QtCore/QRegularExpression>
#include <QtGui/QDesktopServices>
#include <QtGui/QGuiApplication>
#if defined Q_OS_UNIX && !defined Q_OS_MAC && !defined DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#include <giomm.h>
#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);
}
}