From 252bdd2353c145feaed7e1d237b516815d7f316b Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 8 Aug 2020 16:07:13 +0400 Subject: [PATCH] TDESKTOP_DISABLE_DBUS_INTEGRATION -> DESKTOP_APP_DISABLE_DBUS_INTEGRATION --- .../platform/linux/main_window_linux.cpp | 58 +++++++++---------- .../platform/linux/main_window_linux.h | 10 ++-- .../linux/notifications_manager_linux.cpp | 26 ++++----- .../linux/notifications_manager_linux.h | 12 ++-- .../platform/linux/specific_linux.cpp | 30 +++++----- Telegram/SourceFiles/qt_static_plugins.cpp | 12 ++-- Telegram/cmake/telegram_options.cmake | 4 -- 7 files changed, 74 insertions(+), 78 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp index fbf7b6ef08..db9a32190a 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp @@ -33,7 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION #include #include #include @@ -42,7 +42,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include #include -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION namespace Platform { namespace { @@ -236,7 +236,7 @@ QIcon TrayIconGen(int counter, bool muted) { return result; } -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION bool IsIndicatorApplication() { // Hack for indicator-application, which doesn't handle icons sent across D-Bus: // save the icon to a temp file and set the icon name to that filename. @@ -305,10 +305,10 @@ bool UseUnityCounter() { return Result; } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION bool IsSNIAvailable() { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION auto message = QDBusMessage::createMethodCall( kSNIWatcherService.utf16(), qsl("/StatusNotifierWatcher"), @@ -328,7 +328,7 @@ bool IsSNIAvailable() { } else if (reply.error().type() != QDBusError::ServiceUnknown) { LOG(("SNI Error: %1").arg(reply.error().message())); } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION return false; } @@ -342,7 +342,7 @@ quint32 djbStringHash(QString string) { return hash; } -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION bool IsAppMenuSupported() { const auto interface = QDBusConnection::sessionBus().interface(); @@ -406,7 +406,7 @@ void ForceDisabled(QAction *action, bool disabled) { action->setDisabled(false); } } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION } // namespace @@ -428,7 +428,7 @@ void MainWindow::initHook() { LOG(("System tray available: %1").arg(Logs::b(trayAvailable))); Platform::SetTrayIconSupported(trayAvailable); -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION auto sniWatcher = new QDBusServiceWatcher( kSNIWatcherService.utf16(), QDBusConnection::sessionBus(), @@ -472,7 +472,7 @@ void MainWindow::initHook() { } else { LOG(("Not using Unity launcher counter.")); } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION updateWaylandDecorationColors(); @@ -483,11 +483,11 @@ void MainWindow::initHook() { } bool MainWindow::hasTrayIcon() const { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION return trayIcon || (SNIAvailable && _sniTrayIcon); #else return trayIcon; -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION } void MainWindow::psShowTrayMenu() { @@ -495,14 +495,14 @@ void MainWindow::psShowTrayMenu() { } void MainWindow::psTrayMenuUpdated() { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION if (_sniTrayIcon && trayIconMenu) { _sniTrayIcon->setContextMenu(trayIconMenu); } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION } -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION void MainWindow::setSNITrayIcon(int counter, bool muted) { const auto iconName = GetTrayIconName(counter, muted); @@ -618,14 +618,14 @@ void MainWindow::onAppMenuOwnerChanged( UnregisterAppMenu(winId()); } } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION void MainWindow::psSetupTrayIcon() { const auto counter = Core::App().unreadBadge(); const auto muted = Core::App().unreadBadgeMuted(); if (SNIAvailable) { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION LOG(("Using SNI tray icon.")); if (!_sniTrayIcon) { _sniTrayIcon = new StatusNotifierItem( @@ -638,7 +638,7 @@ void MainWindow::psSetupTrayIcon() { attachToSNITrayIcon(); } updateIconCounters(); -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION } else { LOG(("Using Qt tray icon.")); if (!trayIcon) { @@ -657,13 +657,13 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) { if (!Platform::TrayIconSupported()) { return; } else if (mode == dbiwmWindowOnly) { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION if (_sniTrayIcon) { _sniTrayIcon->setContextMenu(0); _sniTrayIcon->deleteLater(); } _sniTrayIcon = nullptr; -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION if (trayIcon) { trayIcon->setContextMenu(0); @@ -686,7 +686,7 @@ void MainWindow::updateIconCounters() { updateWindowIcon(); -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION if (UseUnityCounter()) { const auto launcherUrl = "application://" + GetLauncherFilename(); QVariantMap dbusUnityProperties; @@ -714,7 +714,7 @@ void MainWindow::updateIconCounters() { if (_sniTrayIcon) { setSNITrayIcon(counter, muted); } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION if (trayIcon && IsIconRegenerationNeeded(counter, muted)) { trayIcon->setIcon(TrayIconGen(counter, muted)); @@ -732,11 +732,11 @@ void MainWindow::updateWaylandDecorationColors() { } void MainWindow::LibsLoaded() { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION qDBusRegisterMetaType(); qDBusRegisterMetaType(); qDBusRegisterMetaType(); -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION } void MainWindow::initTrayMenuHook() { @@ -744,7 +744,7 @@ void MainWindow::initTrayMenuHook() { _trayIconMenuXEmbed->deleteOnHide(false); } -#ifdef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifdef DESKTOP_APP_DISABLE_DBUS_INTEGRATION void MainWindow::createGlobalMenu() { } @@ -752,7 +752,7 @@ void MainWindow::createGlobalMenu() { void MainWindow::updateGlobalMenuHook() { } -#else // TDESKTOP_DISABLE_DBUS_INTEGRATION +#else // DESKTOP_APP_DISABLE_DBUS_INTEGRATION void MainWindow::createGlobalMenu() { psMainMenu = new QMenu(this); @@ -1063,10 +1063,10 @@ void MainWindow::onVisibleChanged(bool visible) { } } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION MainWindow::~MainWindow() { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION delete _sniTrayIcon; if (AppMenuSupported) { @@ -1075,7 +1075,7 @@ MainWindow::~MainWindow() { delete _mainMenuExporter; delete psMainMenu; -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION delete _trayIconMenuXEmbed; } diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.h b/Telegram/SourceFiles/platform/linux/main_window_linux.h index de74c3ef86..f4370542dc 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.h +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.h @@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/widgets/popup_menu.h" -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION #include "statusnotifieritem.h" #include #include @@ -45,7 +45,7 @@ public: public slots: void psShowTrayMenu(); -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION void onSNIOwnerChanged( const QString &service, const QString &oldOwner, @@ -73,7 +73,7 @@ public slots: void onVisibleChanged(bool visible); -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION GtkClipboard *gtkClipboard() { @@ -112,7 +112,7 @@ private: void updateIconCounters(); void updateWaylandDecorationColors(); -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION StatusNotifierItem *_sniTrayIcon = nullptr; std::unique_ptr _trayIconFile = nullptr; @@ -142,7 +142,7 @@ private: void setSNITrayIcon(int counter, bool muted); void attachToSNITrayIcon(); -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION GtkClipboard *_gtkClipboard = nullptr; diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index 62463eb7ad..996dec4753 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -17,18 +17,18 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "main/main_session.h" #include "lang/lang_keys.h" -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION #include #include #include #include #include -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION namespace Platform { namespace Notifications { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION namespace { constexpr auto kService = "org.freedesktop.Notifications"_cs; @@ -446,16 +446,16 @@ const QDBusArgument &operator>>( argument.endStructure(); return argument; } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION bool SkipAudio() { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION if (Supported() && GetCapabilities().contains(qsl("inhibitions")) && !InhibitedNotSupported) { return Inhibited(); } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION return false; } @@ -469,18 +469,18 @@ bool SkipFlashBounce() { } bool Supported() { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION return NotificationsSupported; -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION return false; } std::unique_ptr Create( Window::Notifications::System *system) { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION GetSupported(); -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION if ((Core::App().settings().nativeNotifications() && Supported()) || Platform::IsWayland()) { @@ -490,7 +490,7 @@ std::unique_ptr Create( return nullptr; } -#ifdef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifdef DESKTOP_APP_DISABLE_DBUS_INTEGRATION class Manager::Private { public: using Type = Window::Notifications::CachedUserpics::Type; @@ -510,7 +510,7 @@ public: void clearFromSession(not_null session) {} void clearNotification(NotificationId id) {} }; -#else // TDESKTOP_DISABLE_DBUS_INTEGRATION +#else // DESKTOP_APP_DISABLE_DBUS_INTEGRATION class Manager::Private { public: using Type = Window::Notifications::CachedUserpics::Type; @@ -699,7 +699,7 @@ void Manager::Private::clearNotification(NotificationId id) { Manager::Private::~Private() { clearAll(); } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION Manager::Manager(not_null system) : NativeManager(system) diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.h b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.h index b82abb8ac4..a3a1c0ab55 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.h +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.h @@ -10,15 +10,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "platform/platform_notifications_manager.h" #include "base/weak_ptr.h" -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION #include #include -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION namespace Platform { namespace Notifications { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION class NotificationData : public QObject { Q_OBJECT @@ -78,7 +78,7 @@ QDBusArgument &operator<<( const QDBusArgument &operator>>( const QDBusArgument &argument, NotificationData::ImageData &imageData); -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION class Manager : public Window::Notifications::NativeManager @@ -111,6 +111,6 @@ private: } // namespace Notifications } // namespace Platform -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION Q_DECLARE_METATYPE(Platform::Notifications::NotificationData::ImageData) -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index 6fd2edc52b..1ebf5e3ca2 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -31,13 +31,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION #include #include #include #include #include -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION #include #include @@ -74,7 +74,7 @@ QStringList PlatformThemes; bool IsTrayIconSupported = true; -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION void PortalAutostart(bool autostart, bool silent = false) { QVariantMap options; options["reason"] = tr::lng_settings_auto_start(tr::now); @@ -135,7 +135,7 @@ uint FileChooserPortalVersion() { return Result; } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION QString FlatpakID() { static const auto Result = [] { @@ -356,7 +356,7 @@ std::optional XCBLastUserInputTime() { return std::nullopt; } -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION std::optional FreedesktopDBusLastUserInputTime() { static auto NotSupported = false; @@ -443,7 +443,7 @@ std::optional MutterDBusLastUserInputTime() { return std::nullopt; } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION uint XCBMoveResizeFromEdges(Qt::Edges edges) { if (edges == (Qt::TopEdge | Qt::LeftEdge)) @@ -667,13 +667,13 @@ bool IsQtPluginsBundled() { } bool IsXDGDesktopPortalPresent() { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION static const auto Result = QDBusInterface( kXDGDesktopPortalService.utf16(), kXDGDesktopPortalObjectPath.utf16()).isValid(); return Result; -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION return false; } @@ -693,11 +693,11 @@ bool UseXDGDesktopPortal() { } bool CanOpenDirectoryWithPortal() { -#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) || defined DESKTOP_APP_QT_PATCHED) && !defined TDESKTOP_DISABLE_DBUS_INTEGRATION +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) || defined DESKTOP_APP_QT_PATCHED) && !defined DESKTOP_APP_DISABLE_DBUS_INTEGRATION return FileChooserPortalVersion() >= 3; -#else // (Qt >= 5.15 || DESKTOP_APP_QT_PATCHED) && !TDESKTOP_DISABLE_DBUS_INTEGRATION +#else // (Qt >= 5.15 || DESKTOP_APP_QT_PATCHED) && !DESKTOP_APP_DISABLE_DBUS_INTEGRATION return false; -#endif // (Qt < 5.15 && !DESKTOP_APP_QT_PATCHED) || TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // (Qt < 5.15 && !DESKTOP_APP_QT_PATCHED) || DESKTOP_APP_DISABLE_DBUS_INTEGRATION } QString CurrentExecutablePath(int argc, char *argv[]) { @@ -873,7 +873,7 @@ std::optional LastUserInputTime() { return XCBLastUserInputTime(); } -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION const auto freedesktopResult = FreedesktopDBusLastUserInputTime(); if (freedesktopResult.has_value()) { return freedesktopResult; @@ -883,7 +883,7 @@ std::optional LastUserInputTime() { if (mutterResult.has_value()) { return mutterResult; } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION return std::nullopt; } @@ -1293,9 +1293,9 @@ void psAutoStart(bool start, bool silent) { return; if (InFlatpak()) { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION PortalAutostart(start, silent); -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION } else { const auto autostart = [&] { if (InSnap()) { diff --git a/Telegram/SourceFiles/qt_static_plugins.cpp b/Telegram/SourceFiles/qt_static_plugins.cpp index 82a4cdb6b2..c5f7473ce7 100644 --- a/Telegram/SourceFiles/qt_static_plugins.cpp +++ b/Telegram/SourceFiles/qt_static_plugins.cpp @@ -38,12 +38,12 @@ Q_IMPORT_PLUGIN(QGenericEnginePlugin) Q_IMPORT_PLUGIN(QComposePlatformInputContextPlugin) Q_IMPORT_PLUGIN(QSvgPlugin) Q_IMPORT_PLUGIN(QSvgIconPlugin) -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION Q_IMPORT_PLUGIN(QConnmanEnginePlugin) Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin) Q_IMPORT_PLUGIN(QIbusPlatformInputContextPlugin) Q_IMPORT_PLUGIN(QXdgDesktopPortalThemePlugin) -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION #endif // Q_OS_WIN | Q_OS_MAC | Q_OS_UNIX #endif // !DESKTOP_APP_USE_PACKAGED @@ -51,11 +51,11 @@ Q_IMPORT_PLUGIN(QXdgDesktopPortalThemePlugin) #if !defined DESKTOP_APP_USE_PACKAGED || defined DESKTOP_APP_USE_PACKAGED_LAZY Q_IMPORT_PLUGIN(QWaylandMaterialDecorationPlugin) Q_IMPORT_PLUGIN(NimfInputContextPlugin) -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION Q_IMPORT_PLUGIN(QFcitxPlatformInputContextPlugin) Q_IMPORT_PLUGIN(QFcitx5PlatformInputContextPlugin) Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin) -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION #endif // !DESKTOP_APP_USE_PACKAGED || DESKTOP_APP_USE_PACKAGED_LAZY #if !defined DESKTOP_APP_USE_PACKAGED || defined DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES @@ -65,8 +65,8 @@ Q_IMPORT_PLUGIN(Qt5CTStylePlugin) // conflicts with Qt static link #ifdef DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION +#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION Q_IMPORT_PLUGIN(LXQtPlatformThemePlugin) -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION +#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION #endif // DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES #endif // Q_OS_UNIX && !Q_OS_MAC diff --git a/Telegram/cmake/telegram_options.cmake b/Telegram/cmake/telegram_options.cmake index 9895b5c307..c3fad735ff 100644 --- a/Telegram/cmake/telegram_options.cmake +++ b/Telegram/cmake/telegram_options.cmake @@ -85,10 +85,6 @@ if (TDESKTOP_DISABLE_GTK_INTEGRATION) target_compile_definitions(Telegram PRIVATE TDESKTOP_DISABLE_GTK_INTEGRATION) endif() -if (DESKTOP_APP_DISABLE_DBUS_INTEGRATION) - target_compile_definitions(Telegram PRIVATE TDESKTOP_DISABLE_DBUS_INTEGRATION) -endif() - if (NOT TDESKTOP_LAUNCHER_BASENAME) set(TDESKTOP_LAUNCHER_BASENAME "telegramdesktop") endif()