mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 05:30:06 +08:00
Update KDE detection for Linux environment
This commit is contained in:
parent
f03ad7d165
commit
8b9c02473a
10
3rdparty/qv2ray/v2/proxy/QvProxyConfigurator.cpp
vendored
10
3rdparty/qv2ray/v2/proxy/QvProxyConfigurator.cpp
vendored
@ -272,9 +272,8 @@ namespace Qv2ray::components::proxy {
|
|||||||
#elif defined(Q_OS_LINUX)
|
#elif defined(Q_OS_LINUX)
|
||||||
QList<ProcessArgument> actions;
|
QList<ProcessArgument> actions;
|
||||||
//
|
//
|
||||||
bool isKDE = qEnvironmentVariable("XDG_SESSION_DESKTOP") == "KDE" ||
|
bool isKDE = qEnvironmentVariable("XDG_CURRENT_DESKTOP") == "KDE" ||
|
||||||
qEnvironmentVariable("XDG_SESSION_DESKTOP") == "plasma"||
|
qEnvironmentVariable("XDG_CURRENT_DESKTOP") == "Trinity";
|
||||||
qEnvironmentVariable("XDG_SESSION_DESKTOP") == "tde";
|
|
||||||
const auto configPath = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
|
const auto configPath = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
|
||||||
QString kwriteconfigCmd = qEnvironmentVariable("KDE_SESSION_VERSION") == "5" ? "kwriteconfig5" : qEnvironmentVariable("KDE_SESSION_VERSION") == "6" ? "kwriteconfig6" : "kwriteconfig";
|
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)
|
#elif defined(Q_OS_LINUX)
|
||||||
QList<ProcessArgument> actions;
|
QList<ProcessArgument> actions;
|
||||||
const bool isKDE = qEnvironmentVariable("XDG_SESSION_DESKTOP") == "KDE" ||
|
const bool isKDE = qEnvironmentVariable("XDG_CURRENT_DESKTOP") == "KDE" ||
|
||||||
qEnvironmentVariable("XDG_SESSION_DESKTOP") == "plasma"||
|
qEnvironmentVariable("XDG_CURRENT_DESKTOP") == "Trinity";
|
||||||
qEnvironmentVariable("XDG_SESSION_DESKTOP") == "tde";
|
|
||||||
const auto configRoot = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
|
const auto configRoot = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
|
||||||
|
|
||||||
// Setting System Proxy Mode to: None
|
// Setting System Proxy Mode to: None
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user