9 Star 6 Fork 30

src-openEuler/dde-control-center

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-fix-Array-out-of-bounds-causes-crash-handling.patch 1.43 KB
一键复制 编辑 原始数据 按行查看 历史
Venland 提交于 2024-03-21 14:44 +08:00 . fix: Array out of bounds causes crash handling
From 96ad287f01dc69ae1f98f2fd884fc0a97b1cc234 Mon Sep 17 00:00:00 2001
From: liweigang <izmirvii@gmail.com>
Date: Fri, 22 Mar 2024 09:48:17 +0800
Subject: [PATCH] fix: Array out of bounds causes crash handling
Signed-off-by: liweigang <izmirvii@gmail.com>
---
src/frame/window/modules/systeminfo/systeminfowidget.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/frame/window/modules/systeminfo/systeminfowidget.cpp b/src/frame/window/modules/systeminfo/systeminfowidget.cpp
index 0d753d4..745fb19 100644
--- a/src/frame/window/modules/systeminfo/systeminfowidget.cpp
+++ b/src/frame/window/modules/systeminfo/systeminfowidget.cpp
@@ -95,6 +95,14 @@ void SystemInfoWidget::initData()
connect(m_listView, &DListView::clicked, this, &SystemInfoWidget::onListClicked);
connect(m_listView, &DListView::activated, m_listView, &DListView::clicked);
connect(GSettingWatcher::instance(), &GSettingWatcher::requestUpdateSecondMenu, this, &SystemInfoWidget::onRequestUpdateSecondMenu);
+ if (IsServerSystem) {
+ connect(GSettingWatcher::instance(),
+ &GSettingWatcher::requestUpdateSecondMenu, this, [this](int row) {
+ if (m_itemList.size() > row && m_itemList[row].gsettingsName == "editionLicense") {
+ m_listView->setRowHidden(row, true);
+ }
+ });
+ }
}
DListView *SystemInfoWidget::getSystemListViewPointer()
--
2.33.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/dde-control-center.git
git@gitee.com:src-openeuler/dde-control-center.git
src-openeuler
dde-control-center
dde-control-center
openEuler-20.03-LTS-SP4

搜索帮助