From 38337fa9d384baf2e5803414e2652ad87cc06ab7 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Tue, 28 Apr 2020 10:59:00 +0400 Subject: Fix URL opening in snap sandbox For some reason, snapd doesn't allow dbus activating of xdg-desktop-portal and returns AccessDenied to any request. Qt checks the returned error and if it is not ServiceUnknown, Qt doesn't try to open URL through xdg-open, which encounters into situation that URLs doesn't open until some other app tries to access xdg-desktop-portal. Fixes: QTBUG-83837 Change-Id: I9e600f734401bd4295d97e2b5686b916c6c7f762 Reviewed-by: Thiago Macieira --- src/platformsupport/services/genericunix/qgenericunixservices.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/platformsupport/services') diff --git a/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp index b583d636c0..10d5468b9a 100644 --- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp +++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp @@ -189,7 +189,7 @@ static inline bool isPortalReturnPermanent(const QDBusError &error) // A service unknown error isn't permanent, it just indicates that we // should fall back to the regular way. This check includes // QDBusError::NoError. - return error.type() != QDBusError::ServiceUnknown; + return error.type() != QDBusError::ServiceUnknown && error.type() != QDBusError::AccessDenied; } static inline QDBusMessage xdgDesktopPortalOpenFile(const QUrl &url) -- cgit v1.2.3