From e03bee7dec7798622832df47991a5caaa0dc0198 Mon Sep 17 00:00:00 2001 From: ck Date: Mon, 10 Apr 2023 11:11:07 +0800 Subject: [PATCH] chore: deepin theme plugin add DDE key add `DDE` to Keys --- platformthemeplugin/deepin.json | 2 +- platformthemeplugin/main.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/platformthemeplugin/deepin.json b/platformthemeplugin/deepin.json index 0701776a..a2320ed4 100644 --- a/platformthemeplugin/deepin.json +++ b/platformthemeplugin/deepin.json @@ -1,3 +1,3 @@ { - "Keys" : [ "deepin" ] + "Keys" : [ "deepin", "DDE" ] } diff --git a/platformthemeplugin/main.cpp b/platformthemeplugin/main.cpp index cc985cfd..9d752feb 100644 --- a/platformthemeplugin/main.cpp +++ b/platformthemeplugin/main.cpp @@ -1,5 +1,5 @@ /* - * 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 */ #include @@ -26,10 +26,11 @@ class QDeepinThemePlugin : public QPlatformThemePlugin QPlatformTheme *QDeepinThemePlugin::create(const QString &key, const QStringList ¶ms) { Q_UNUSED(params); - if (!key.compare(QLatin1String(QDeepinTheme::name), Qt::CaseInsensitive)) + const QStringList &keys = {QLatin1String(QDeepinTheme::name), QLatin1String("DDE")}; + if (keys.contains(key, Qt::CaseInsensitive)) return new QDeepinTheme; - return 0; + return nullptr; } QT_END_NAMESPACE