From c1c5f49dc375f381b915859045cb6f92b4c996f3 Mon Sep 17 00:00:00 2001 From: ck Date: Mon, 10 Apr 2023 11:01:44 +0800 Subject: [PATCH] chore: support XDG_SESSION_DESKTOP set to DDE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 环境变量设置为 DDE 时,当然是 DDE 了 --- src/dsysinfo.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dsysinfo.cpp b/src/dsysinfo.cpp index d3f137b2..8f812829 100644 --- a/src/dsysinfo.cpp +++ b/src/dsysinfo.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2017 - 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2017 - 2023 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: LGPL-3.0-or-later @@ -555,7 +555,9 @@ bool DSysInfo::isDeepin() bool DSysInfo::isDDE() { if (!DSysInfo::isDeepin()) { - return qgetenv("XDG_SESSION_DESKTOP") == "deepin"; + const QByteArray &xsd = qgetenv("XDG_SESSION_DESKTOP"); + return !xsd.compare("deepin", Qt::CaseInsensitive) || + !xsd.compare("DDE", Qt::CaseInsensitive); } siGlobal->ensureDeepinInfo();