Hide IsXDGDesktopPortalPresent in a private namespace
This commit is contained in:
parent
6c023084d9
commit
f7dcf6ce81
|
@ -124,6 +124,14 @@ void PortalAutostart(bool autostart, bool silent = false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsXDGDesktopPortalPresent() {
|
||||||
|
static const auto Result = QDBusInterface(
|
||||||
|
kXDGDesktopPortalService.utf16(),
|
||||||
|
kXDGDesktopPortalObjectPath.utf16()).isValid();
|
||||||
|
|
||||||
|
return Result;
|
||||||
|
}
|
||||||
|
|
||||||
bool IsXDGDesktopPortalKDEPresent() {
|
bool IsXDGDesktopPortalKDEPresent() {
|
||||||
static const auto Result = QDBusInterface(
|
static const auto Result = QDBusInterface(
|
||||||
qsl("org.freedesktop.impl.portal.desktop.kde"),
|
qsl("org.freedesktop.impl.portal.desktop.kde"),
|
||||||
|
@ -642,18 +650,6 @@ bool AreQtPluginsBundled() {
|
||||||
#endif // DESKTOP_APP_USE_PACKAGED && !DESKTOP_APP_USE_PACKAGED_LAZY
|
#endif // DESKTOP_APP_USE_PACKAGED && !DESKTOP_APP_USE_PACKAGED_LAZY
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsXDGDesktopPortalPresent() {
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
|
||||||
static const auto Result = QDBusInterface(
|
|
||||||
kXDGDesktopPortalService.utf16(),
|
|
||||||
kXDGDesktopPortalObjectPath.utf16()).isValid();
|
|
||||||
|
|
||||||
return Result;
|
|
||||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool UseXDGDesktopPortal() {
|
bool UseXDGDesktopPortal() {
|
||||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
static const auto Result = [&] {
|
static const auto Result = [&] {
|
||||||
|
@ -1093,6 +1089,7 @@ void start() {
|
||||||
qputenv("QT_WAYLAND_DECORATION", "material");
|
qputenv("QT_WAYLAND_DECORATION", "material");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
// this can give us a chance to use
|
// this can give us a chance to use
|
||||||
// a proper file dialog for current session
|
// a proper file dialog for current session
|
||||||
DEBUG_LOG(("Checking for XDG Desktop Portal..."));
|
DEBUG_LOG(("Checking for XDG Desktop Portal..."));
|
||||||
|
@ -1108,7 +1105,6 @@ void start() {
|
||||||
DEBUG_LOG(("XDG Desktop Portal is not present :("));
|
DEBUG_LOG(("XDG Desktop Portal is not present :("));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
|
||||||
// IBus has changed its socket path several times
|
// IBus has changed its socket path several times
|
||||||
// and each change should be synchronized with Qt.
|
// and each change should be synchronized with Qt.
|
||||||
// Moreover, the last time Qt changed the path,
|
// Moreover, the last time Qt changed the path,
|
||||||
|
|
|
@ -23,26 +23,22 @@ inline void SetWatchingMediaKeys(bool watching) {
|
||||||
bool InFlatpak();
|
bool InFlatpak();
|
||||||
bool InSnap();
|
bool InSnap();
|
||||||
bool IsStaticBinary();
|
bool IsStaticBinary();
|
||||||
|
bool AreQtPluginsBundled();
|
||||||
bool UseGtkIntegration();
|
bool UseGtkIntegration();
|
||||||
bool IsGtkIntegrationForced();
|
bool IsGtkIntegrationForced();
|
||||||
bool AreQtPluginsBundled();
|
|
||||||
|
|
||||||
bool IsXDGDesktopPortalPresent();
|
|
||||||
bool UseXDGDesktopPortal();
|
bool UseXDGDesktopPortal();
|
||||||
bool CanOpenDirectoryWithPortal();
|
bool CanOpenDirectoryWithPortal();
|
||||||
|
|
||||||
QString AppRuntimeDirectory();
|
QString AppRuntimeDirectory();
|
||||||
|
|
||||||
QString GetLauncherBasename();
|
QString GetLauncherBasename();
|
||||||
QString GetLauncherFilename();
|
QString GetLauncherFilename();
|
||||||
|
|
||||||
QString GetIconName();
|
QString GetIconName();
|
||||||
|
|
||||||
|
void InstallLauncher(bool force = false);
|
||||||
|
|
||||||
inline void IgnoreApplicationActivationRightNow() {
|
inline void IgnoreApplicationActivationRightNow() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstallLauncher(bool force = false);
|
|
||||||
|
|
||||||
} // namespace Platform
|
} // namespace Platform
|
||||||
|
|
||||||
inline void psCheckLocalSocket(const QString &serverName) {
|
inline void psCheckLocalSocket(const QString &serverName) {
|
||||||
|
|
Loading…
Reference in New Issue