2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

Fix duplicate object path in SandboxAutostart and add some logging

This commit is contained in:
Ilya Fedin
2020-01-30 21:03:20 +04:00
committed by John Preston
parent a831c1703a
commit d80b3fda7d
2 changed files with 10 additions and 3 deletions

View File

@@ -55,11 +55,18 @@ void SandboxAutostart(bool autostart) {
});
options["dbus-activatable"] = false;
QDBusInterface(
const auto requestBackgroundReply = QDBusInterface(
qsl("org.freedesktop.portal.Desktop"),
qsl("/org/freedesktop/portal/desktop"),
qsl("/org/freedesktop/portal/desktop")
qsl("org.freedesktop.portal.Background")
).call(qsl("RequestBackground"), QString(), options);
if (requestBackgroundReply.type() == QDBusMessage::ErrorMessage) {
LOG(("Flatpak autostart error: %1")
.arg(requestBackgroundReply.errorMessage()));
} else if (requestBackgroundReply.type() != QDBusMessage::ReplyMessage) {
LOG(("Flatpak autostart error: invalid reply"));
}
}
#endif