6 Star 1 Fork 17

src-openEuler/kiran-cc-daemon

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0029-fix-gnome-Fix-crash-caused-by-the-previous-commit-du.patch 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
From 24a3b5e00c9d57472e5b06d59248df9fcecedc87 Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Tue, 8 Oct 2024 10:36:03 +0800
Subject: [PATCH] fix(gnome): Fix crash caused by the previous commit due to
the existence of a schema but the absence of a color-schema
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复上次提交导致存在schema但是不存在color-scehma导致崩溃,加强对于schema以及key的判断
---
plugins/appearance/theme/appearance-theme.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/plugins/appearance/theme/appearance-theme.cpp b/plugins/appearance/theme/appearance-theme.cpp
index 186e156..9f31ca5 100644
--- a/plugins/appearance/theme/appearance-theme.cpp
+++ b/plugins/appearance/theme/appearance-theme.cpp
@@ -53,7 +53,13 @@ AppearanceTheme::AppearanceTheme()
if (std::find(schemas.begin(), schemas.end(), GNOME_DESKTOP_SCHEMA_ID) != schemas.end())
{
- this->gnome_desktop_settigns_ = Gio::Settings::create(GNOME_DESKTOP_SCHEMA_ID);
+ auto temp_settings = Gio::Settings::create(GNOME_DESKTOP_SCHEMA_ID);
+ auto keys = temp_settings->list_keys();
+ if ( std::find(keys.begin(), keys.end(), GNOME_DESKTOP_SCHEMA_KEY_COLOR_SCHEMA) != keys.end() )
+ {
+ // 确保 org.gnome.desktop.interface color-scheme 完全存在才使用
+ this->gnome_desktop_settigns_ = temp_settings;
+ }
}
}
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/kiran-cc-daemon.git
git@gitee.com:src-openeuler/kiran-cc-daemon.git
src-openeuler
kiran-cc-daemon
kiran-cc-daemon
master

搜索帮助