kiran-qt5-integration/0002-refactor-log-update-log-output-when-creating-theme-a.patch
liuxinhao 3f561a8cc3 refactor(style): update painting effect of the scrolling area
refactor(log): update log output when creating theme and style plug-ins
2022-08-09 10:45:42 +08:00

67 lines
2.4 KiB
Diff

From d3cb409336c622b078b3c03ef6266775b5717346 Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Mon, 8 Aug 2022 17:02:11 +0800
Subject: [PATCH 2/2] refactor(log): update log output when creating theme and
style plug-ins
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 更新创建主题和风格插件时的日志输出
---
platformtheme/kiran-theme-plugin.cpp | 2 +-
style/src/kiran-style-plugin.cpp | 22 ++++++++++++----------
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/platformtheme/kiran-theme-plugin.cpp b/platformtheme/kiran-theme-plugin.cpp
index 20c0198..961b7b3 100644
--- a/platformtheme/kiran-theme-plugin.cpp
+++ b/platformtheme/kiran-theme-plugin.cpp
@@ -23,7 +23,7 @@ QPlatformTheme* KiranThemePlugin::create(const QString& key, const QStringList&
if(keySet.contains(key))
{
- qDebug(kiranPlatformTheme) << "create kiran style for" << QCoreApplication::applicationName();
+ qDebug(kiranPlatformTheme) << "create kiran platformtheme for" << QCoreApplication::applicationName();
return new KiranTheme(paramList);
}
diff --git a/style/src/kiran-style-plugin.cpp b/style/src/kiran-style-plugin.cpp
index ee5f33e..aefbabc 100644
--- a/style/src/kiran-style-plugin.cpp
+++ b/style/src/kiran-style-plugin.cpp
@@ -26,18 +26,20 @@ KiranStylePlugin::KiranStylePlugin(QObject *parent) : QStylePlugin(parent)
QStyle *KiranStylePlugin::create(const QString & key)
{
- QStringList disableApps = KiranIntegrationSettings::instance()->getDisableKiranStyleApps();
- QString processName = qAppName();
- if( disableApps.contains(processName) )
- {
- return QStyleFactory::create("fusion");
- }
-
- qDebug("create style:%s",key.toStdString().c_str());
if( key.compare("kiran",Qt::CaseInsensitive) == 0 )
{
- return new Style();
+ QStringList disableApps = KiranIntegrationSettings::instance()->getDisableKiranStyleApps();
+ QString processName = qAppName();
+ if( disableApps.contains(processName) )
+ {
+ qDebug("%s in black list,create fusion style for it.",processName.toStdString().c_str());
+ return QStyleFactory::create("fusion");
+ }
+ else
+ {
+ qDebug("create style:%s",key.toStdString().c_str());
+ return new Style();
+ }
}
-
return nullptr;
}
--
2.33.0