Remove unnecessary Q_OS_UNIX && !Q_OS_MAC check
Thanks to cmake_dependent_option
This commit is contained in:
parent
367859c684
commit
13e59e27eb
1 changed files with 6 additions and 6 deletions
|
|
@ -12,18 +12,18 @@
|
||||||
#include "base/qthelp_url.h"
|
#include "base/qthelp_url.h"
|
||||||
#include "base/qt/qt_string_view.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"
|
#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/QUrl>
|
||||||
#include <QtCore/QRegularExpression>
|
#include <QtCore/QRegularExpression>
|
||||||
#include <QtGui/QDesktopServices>
|
#include <QtGui/QDesktopServices>
|
||||||
#include <QtGui/QGuiApplication>
|
#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>
|
#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 {
|
QString TextClickHandler::readable() const {
|
||||||
const auto result = url();
|
const auto result = url();
|
||||||
|
|
@ -88,7 +88,7 @@ void UrlClickHandler::Open(QString url, QVariant context) {
|
||||||
if (IsEmail(url)) {
|
if (IsEmail(url)) {
|
||||||
url = "mailto: " + 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,
|
// Desktop entry spec implementation,
|
||||||
// prefer it over QDesktopServices::openUrl since it just calls
|
// prefer it over QDesktopServices::openUrl since it just calls
|
||||||
// the xdg-open shell script that is known to be bugged:
|
// the xdg-open shell script that is known to be bugged:
|
||||||
|
|
@ -106,7 +106,7 @@ void UrlClickHandler::Open(QString url, QVariant context) {
|
||||||
}
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
}
|
}
|
||||||
#endif // Q_OS_UNIX && !Q_OS_MAC && !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
QDesktopServices::openUrl(url);
|
QDesktopServices::openUrl(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue