From 5c4a94ba85f0bed9633c385455685ba364a72540 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 3 Apr 2023 22:47:13 +0400 Subject: Make flatpak check more backward compatible Since 68de00e0d4f2c574162a6e033d41786e3757d25d, the check doesn't work with flatpak versions lesser than 1.13.1. Checking the file in the root directory works since flatpak 0.6.10. Pick-to: 6.5 6.2 Change-Id: Icc83ea5de4a962b52a737c9842248df3b60b1331 Reviewed-by: Thiago Macieira --- src/gui/platform/unix/qgenericunixservices.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/platform/unix/qgenericunixservices.cpp') diff --git a/src/gui/platform/unix/qgenericunixservices.cpp b/src/gui/platform/unix/qgenericunixservices.cpp index 1563b38d546..4e27a33af5a 100644 --- a/src/gui/platform/unix/qgenericunixservices.cpp +++ b/src/gui/platform/unix/qgenericunixservices.cpp @@ -162,7 +162,7 @@ static inline bool launch(const QString &launcher, const QUrl &url, #if QT_CONFIG(dbus) static inline bool checkNeedPortalSupport() { - return !QStandardPaths::locate(QStandardPaths::RuntimeLocation, "flatpak-info"_L1).isEmpty() || qEnvironmentVariableIsSet("SNAP"); + return QFileInfo::exists("/.flatpak-info"_L1) || qEnvironmentVariableIsSet("SNAP"); } static inline QDBusMessage xdgDesktopPortalOpenFile(const QUrl &url, const QString &parentWindow, -- cgit v1.2.3