mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
TDESKTOP_DISABLE_DBUS_INTEGRATION -> DESKTOP_APP_DISABLE_DBUS_INTEGRATION
This commit is contained in:
@@ -31,13 +31,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include <private/qwaylandwindow_p.h>
|
||||
#include <private/qwaylandshellsurface_p.h>
|
||||
|
||||
#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
#include <QtDBus/QDBusInterface>
|
||||
#include <QtDBus/QDBusConnection>
|
||||
#include <QtDBus/QDBusMessage>
|
||||
#include <QtDBus/QDBusReply>
|
||||
#include <QtDBus/QDBusError>
|
||||
#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION
|
||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/screensaver.h>
|
||||
@@ -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<crl::time> XCBLastUserInputTime() {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
std::optional<crl::time> FreedesktopDBusLastUserInputTime() {
|
||||
static auto NotSupported = false;
|
||||
|
||||
@@ -443,7 +443,7 @@ std::optional<crl::time> 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<crl::time> 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<crl::time> 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()) {
|
||||
|
Reference in New Issue
Block a user