fix: exclude onboard from privacy FileAndFolder app list#2926
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the privacy security worker to exclude the onboard virtual keyboard and its settings application from the displayed application list when managing privacy permissions, preventing them from appearing in camera and file/folder permission UIs. Class diagram for PrivacySecurityWorker exclude app list updateclassDiagram
class PrivacySecurityWorker {
+addAppItem(int dataIndex) ApplicationItem
-m_ddeAmModel
}
class AppItemModel {
<<enum>>
+NoDisplayRole
}
class ApplicationItem
PrivacySecurityWorker --> ApplicationItem : creates
PrivacySecurityWorker --> AppItemModel : uses
class ExcludeAppList {
<<static_config>>
+s_excludeApp : QStringList
}
PrivacySecurityWorker --> ExcludeAppList : consults
note for ExcludeAppList "s_excludeApp includes dde_computer, org_deepin_dde_control_center, dde_file_manager, dde_trash, deepin_manual, deepin_terminal, onboard, onboard_settings"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider adding a brief comment explaining why
onboardandonboard-settingsare excluded (e.g., virtual keyboard/UI-only), so future changes to the exclude list are easier to reason about. - If there are or may be other similar non-user-facing utility apps, it might be worth centralizing this exclusion list or deriving it from app metadata (e.g., a dedicated flag) rather than maintaining an ever-growing hardcoded list.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider adding a brief comment explaining why `onboard` and `onboard-settings` are excluded (e.g., virtual keyboard/UI-only), so future changes to the exclude list are easier to reason about.
- If there are or may be other similar non-user-facing utility apps, it might be worth centralizing this exclusion list or deriving it from app metadata (e.g., a dedicated flag) rather than maintaining an ever-growing hardcoded list.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, wyu71 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
TAG Bot New tag: 6.1.66 |
- Added onboard and onboard-settings to s_excludeApp list to prevent screen keyboard from appearing in camera and file/folder permission lists. Log: exclude onboard from privacy FileAndFolder app list pms: BUG-346135
|
/forcemerge |
deepin pr auto review我来对这段代码进行审查分析:
改进建议代码: // 需要在隐私安全设置中排除的系统应用列表
static const QSet<QString> s_excludeApp = {
"dde-computer",
"dde-file-manager",
"dde-trash",
"deepin-manual",
"deepin-terminal",
"onboard",
"onboard-settings",
"org.deepin.dde.control-center"
};
ApplicationItem *PrivacySecurityWorker::addAppItem(int dataIndex)
{
// 添加输入验证
if (dataIndex < 0 || dataIndex >= m_ddeAmModel->rowCount()) {
return nullptr;
}
const auto &NoDisplay = m_ddeAmModel->data(m_ddeAmModel->index(dataIndex, 0),
DS_NAMESPACE::AppItemModel::NoDisplayRole).toBool();
// 其他代码...
}主要改进点:
|
|
This pr force merged! (status: blocked) |
Log: exclude onboard from privacy FileAndFolder app list
pms: BUG-346135
Summary by Sourcery
Bug Fixes: