diff options
Diffstat (limited to 'src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp')
-rw-r--r-- | src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp b/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp index bede70975a..b4b1fcaba7 100644 --- a/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp +++ b/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp @@ -53,6 +53,7 @@ #include <qrect.h> #include <qloggingcategory.h> #include <qstandardpaths.h> +#include <qfileinfo.h> #include <qdir.h> #include <qmetaobject.h> #include <qpa/qplatformintegration.h> @@ -71,8 +72,12 @@ Q_LOGGING_CATEGORY(qLcTray, "qt.qpa.tray") static QString iconTempPath() { QString tempPath = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation); - if (!tempPath.isEmpty()) + if (!tempPath.isEmpty()) { + QString flatpakId = qEnvironmentVariable("FLATPAK_ID"); + if (!flatpakId.isEmpty() && QFileInfo::exists(QLatin1String("/.flatpak-info"))) + tempPath += QLatin1String("/app/") + flatpakId; return tempPath; + } tempPath = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation); |