1
0
Fork 0

Get rid of DESKTOP_APP_DISABLE_DBUS_INTEGRATION

Desktop App Toolkit uses GLib as the D-Bus library for quite long time, but GLib is not only a D-Bus library, it's more a basic library providing native Linux APIs implementing various specs. The situation right now is that DESKTOP_APP_DISABLE_DBUS_INTEGRATION disables not only D-Bus code but all the native API integration such as MIME handling or .desktop file parsing. In other words, the option disables native Linux APIs on Linux what is absurd and doesn't have any sense.
This commit is contained in:
Ilya Fedin 2023-05-06 02:23:41 +04:00 committed by John Preston
parent d625b4d1ba
commit c09c5b61a8
7 changed files with 9 additions and 21 deletions

View file

@ -21,14 +21,14 @@ if (LINUX)
add_checked_subdirectory(dispatch)
endif()
add_checked_subdirectory(expected)
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
if (LINUX AND TARGET Qt::DBus)
add_checked_subdirectory(fcitx_qt5)
if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION)
add_checked_subdirectory(fcitx5_qt)
endif()
endif()
add_checked_subdirectory(ffmpeg)
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
if (LINUX)
add_checked_subdirectory(glib)
add_checked_subdirectory(glibmm)
endif()

View file

@ -47,7 +47,7 @@ if (NOT LINUX)
)
endif()
if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
if (TARGET Qt::DBus)
set_source_files_properties(${kcoreaddons_src}/io/org.freedesktop.portal.FileTransfer.xml PROPERTIES INCLUDE ${kcoreaddons_src}/io/dbustypes_p.h)
qt_add_dbus_interface(_dbus_SRCS ${kcoreaddons_src}/io/org.freedesktop.portal.FileTransfer.xml org.freedesktop.portal.FileTransfer)

View file

@ -51,11 +51,7 @@ if (LINUX)
find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS WaylandCompositor QUIET)
endif()
if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS DBus REQUIRED)
elseif (NOT DESKTOP_APP_USE_PACKAGED)
find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS DBus QUIET)
endif()
endif()
set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "(gen)")

View file

@ -25,7 +25,7 @@ if (LINUX)
desktop-app::external_nimf_qt5
)
if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
if (TARGET Qt::DBus)
target_link_libraries(external_qt_static_plugins
PUBLIC
desktop-app::external_fcitx_qt5

View file

@ -34,14 +34,14 @@ Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
Q_IMPORT_PLUGIN(QXcbEglIntegrationPlugin)
Q_IMPORT_PLUGIN(QComposePlatformInputContextPlugin)
Q_IMPORT_PLUGIN(QSvgIconPlugin)
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#ifdef QT_DBUS_LIB
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
Q_IMPORT_PLUGIN(QConnmanEnginePlugin)
Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin)
#endif // Qt < 6.0.0
Q_IMPORT_PLUGIN(QIbusPlatformInputContextPlugin)
Q_IMPORT_PLUGIN(QXdgDesktopPortalThemePlugin)
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#endif // QT_DBUS_LIB
#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
Q_IMPORT_PLUGIN(QWaylandIntegrationPlugin)
Q_IMPORT_PLUGIN(QWaylandEglPlatformIntegrationPlugin)
@ -62,12 +62,12 @@ Q_IMPORT_PLUGIN(QJpegXLPlugin)
#if defined Q_OS_UNIX && !defined Q_OS_MAC
Q_IMPORT_PLUGIN(NimfInputContextPlugin)
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#ifdef QT_DBUS_LIB
Q_IMPORT_PLUGIN(QFcitxPlatformInputContextPlugin)
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
Q_IMPORT_PLUGIN(QFcitx5PlatformInputContextPlugin)
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#endif // QT_DBUS_LIB
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin)
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION

View file

@ -23,13 +23,6 @@ if (DESKTOP_APP_DISABLE_CRASH_REPORTS)
)
endif()
if (DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
target_compile_definitions(common_options
INTERFACE
DESKTOP_APP_DISABLE_DBUS_INTEGRATION
)
endif()
if (DESKTOP_APP_DISABLE_X11_INTEGRATION)
target_compile_definitions(common_options
INTERFACE

View file

@ -20,7 +20,6 @@ if (DESKTOP_APP_SPECIAL_TARGET STREQUAL ""
endif()
option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON)
cmake_dependent_option(DESKTOP_APP_DISABLE_DBUS_INTEGRATION "Disable all code for D-Bus integration." OFF LINUX ON)
cmake_dependent_option(DESKTOP_APP_DISABLE_X11_INTEGRATION "Disable all code for X11 integration." OFF LINUX ON)
cmake_dependent_option(DESKTOP_APP_USE_ALLOCATION_TRACER "Use simple allocation tracer." OFF LINUX OFF)
cmake_dependent_option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages." OFF LINUX OFF)