diff options
author | Ilya Fedin <fedin-ilja2010@ya.ru> | 2020-04-28 10:59:00 +0400 |
---|---|---|
committer | Ilya Fedin <fedin-ilja2010@ya.ru> | 2020-05-01 20:03:06 +0400 |
commit | 38337fa9d384baf2e5803414e2652ad87cc06ab7 (patch) | |
tree | 748b87917e990357835214675682f130604f749d /src/platformsupport/services | |
parent | cacac863e7bb5d6751f36ad2a2a3db0fe6774167 (diff) |
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/platformsupport/services')
-rw-r--r-- | src/platformsupport/services/genericunix/qgenericunixservices.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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) |