Get rid of DESKTOP_APP_DISABLE_DBUS_INTEGRATION
This commit is contained in:
parent
b850852221
commit
e8857f5792
2 changed files with 6 additions and 16 deletions
|
|
@ -11,19 +11,16 @@
|
|||
#include "ui/integration.h"
|
||||
#include "base/qthelp_url.h"
|
||||
#include "base/qt/qt_string_view.h"
|
||||
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
#include "base/platform/linux/base_linux_app_launch_context.h"
|
||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
|
||||
#include <QtCore/QUrl>
|
||||
#include <QtCore/QRegularExpression>
|
||||
#include <QtGui/QDesktopServices>
|
||||
#include <QtGui/QGuiApplication>
|
||||
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
#if __has_include(<giomm.h>)
|
||||
#include <giomm.h>
|
||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
#endif // __has_include(<giomm.h>)
|
||||
|
||||
QString TextClickHandler::readable() const {
|
||||
const auto result = url();
|
||||
|
|
@ -88,7 +85,7 @@ void UrlClickHandler::Open(QString url, QVariant context) {
|
|||
if (IsEmail(url)) {
|
||||
url = "mailto: " + url;
|
||||
}
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
#if __has_include(<giomm.h>)
|
||||
// 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 +103,7 @@ void UrlClickHandler::Open(QString url, QVariant context) {
|
|||
}
|
||||
} catch (...) {
|
||||
}
|
||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
#endif // __has_include(<giomm.h>)
|
||||
QDesktopServices::openUrl(url);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,13 +7,10 @@
|
|||
#include "ui/platform/linux/ui_utility_linux.h"
|
||||
|
||||
#include "base/platform/base_platform_info.h"
|
||||
#include "ui/platform/linux/ui_linux_wayland_integration.h"
|
||||
#include "base/const_string.h"
|
||||
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
#include "base/platform/linux/base_linux_glibmm_helper.h"
|
||||
#include "base/platform/linux/base_linux_xdp_utilities.h"
|
||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
#include "ui/platform/linux/ui_linux_wayland_integration.h"
|
||||
#include "base/const_string.h"
|
||||
|
||||
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||
#include "base/platform/linux/base_linux_xcb_utilities.h"
|
||||
|
|
@ -566,7 +563,6 @@ TitleControls::Layout TitleControlsLayout() {
|
|||
}
|
||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
using XDPSettingWatcher = base::Platform::XDP::SettingWatcher;
|
||||
static const XDPSettingWatcher settingWatcher(
|
||||
[=](
|
||||
|
|
@ -578,7 +574,6 @@ TitleControls::Layout TitleControlsLayout() {
|
|||
NotifyTitleControlsLayoutChanged();
|
||||
}
|
||||
});
|
||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
|
||||
return true;
|
||||
}();
|
||||
|
|
@ -604,7 +599,6 @@ TitleControls::Layout TitleControlsLayout() {
|
|||
}
|
||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
const auto portalResult = []() -> std::optional<TitleControls::Layout> {
|
||||
try {
|
||||
using namespace base::Platform::XDP;
|
||||
|
|
@ -630,7 +624,6 @@ TitleControls::Layout TitleControlsLayout() {
|
|||
if (portalResult.has_value()) {
|
||||
return *portalResult;
|
||||
}
|
||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
|
||||
return TitleControls::Layout{
|
||||
.right = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue