From 8b9c02473a824c73019dc8387b25e32458d12d37 Mon Sep 17 00:00:00 2001 From: parhelia512 <0011d3@gmail.com> Date: Thu, 11 Dec 2025 03:58:33 +0800 Subject: [PATCH] Update KDE detection for Linux environment --- 3rdparty/qv2ray/v2/proxy/QvProxyConfigurator.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/3rdparty/qv2ray/v2/proxy/QvProxyConfigurator.cpp b/3rdparty/qv2ray/v2/proxy/QvProxyConfigurator.cpp index 8a279d1..33d249a 100644 --- a/3rdparty/qv2ray/v2/proxy/QvProxyConfigurator.cpp +++ b/3rdparty/qv2ray/v2/proxy/QvProxyConfigurator.cpp @@ -272,9 +272,8 @@ namespace Qv2ray::components::proxy { #elif defined(Q_OS_LINUX) QList actions; // - bool isKDE = qEnvironmentVariable("XDG_SESSION_DESKTOP") == "KDE" || - qEnvironmentVariable("XDG_SESSION_DESKTOP") == "plasma"|| - qEnvironmentVariable("XDG_SESSION_DESKTOP") == "tde"; + bool isKDE = qEnvironmentVariable("XDG_CURRENT_DESKTOP") == "KDE" || + qEnvironmentVariable("XDG_CURRENT_DESKTOP") == "Trinity"; const auto configPath = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation); QString kwriteconfigCmd = qEnvironmentVariable("KDE_SESSION_VERSION") == "5" ? "kwriteconfig5" : qEnvironmentVariable("KDE_SESSION_VERSION") == "6" ? "kwriteconfig6" : "kwriteconfig"; @@ -389,9 +388,8 @@ namespace Qv2ray::components::proxy { } #elif defined(Q_OS_LINUX) QList actions; - const bool isKDE = qEnvironmentVariable("XDG_SESSION_DESKTOP") == "KDE" || - qEnvironmentVariable("XDG_SESSION_DESKTOP") == "plasma"|| - qEnvironmentVariable("XDG_SESSION_DESKTOP") == "tde"; + const bool isKDE = qEnvironmentVariable("XDG_CURRENT_DESKTOP") == "KDE" || + qEnvironmentVariable("XDG_CURRENT_DESKTOP") == "Trinity"; const auto configRoot = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation); // Setting System Proxy Mode to: None