Repository navigation
fix: drop legacy quick-trays plugin directory from scan list - #524
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe loader’s plugin scan list no longer includes the legacy quick-trays directory, preventing repeated nonexistent-directory warnings while preserving scans of the main and system-trays directories. Flow diagram for the updated tray plugin scan listflowchart TD
A[dde-tray-loader starts] --> B["pluginDirs()"]
B --> C[/usr/lib/dde-dock/plugins/]
B --> D[/usr/lib/dde-dock/plugins/system-trays/]
B -. legacy directory removed .-> E[/usr/lib/dde-dock/plugins/quick-trays/]
C --> F[Scan plugin files]
D --> F
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
805cff3 to
abc4de3
Compare
allPluginPaths() scans a fixed list of tray plugin directories while resolving plugin groups. A missing directory is not an error: entries such as quick-trays/ (legacy dde-shell widget tray plugin directory, no package has installed there since those plugins were removed in dde-shell 9fcba120, 2024-07) and custom TRAY_DEBUG_PLUGIN_PATH locations can legitimately not exist. On every dock start, each dde-tray-loader instance printed one qCWarning per missing directory, adding non-actionable noise to the journal. Demote the message to qCDebug. Under the session default logging rules (*.debug=false) it stays silent, and it remains observable for diagnosis with QT_LOGGING_RULES='*.debug=false;org.deepin.dde.tray-loader.debug=true'. Per review discussion, the quick-trays/ entry is kept in the scan list; the problem is the log level, not the directory list. 修复:缺失的托盘插件目录日志降为 qCDebug allPluginPaths() 解析插件分组时会扫描固定的托盘插件目录列表。目录缺失 并非错误:例如 quick-trays/(旧 dde-shell widget 托盘插件目录,自 dde-shell 9fcba120,2024-07 起无包提供)以及 TRAY_DEBUG_PLUGIN_PATH 自定义路径都可能合法地不存在。此前每次 dock 启动,每个 dde-tray-loader 实例都会为每个缺失目录打印一条 qCWarning,给 journal 带来无法行动的 噪音。将日志降为 qCDebug:会话默认规则(*.debug=false)下保持静默, 排查时仍可通过 QT_LOGGING_RULES='*.debug=false;org.deepin.dde.tray-loader.debug=true' 观察。按评审讨论,quick-trays/ 扫描条目保留:问题在日志级别而不在 目录列表。 PMS: TASK-394335
abc4de3 to
9e6b4dc
Compare
降级得了.jpg |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia, Ivy233 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 |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 无需修改,语法正确,逻辑清晰。qCDebug 与 qCWarning 均为 Qt 标准日志宏,调用方式一致,语法完全正确。 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 变更简洁明确,符合 commit message 中减少遗留目录冗余警告的目的。建议保持当前代码风格。 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 将日志级别从 Warning 降级为 Debug,在生产环境中 Debug 日志通常被禁用,可减少不必要的 I/O 开销,对性能有轻微正面影响。 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: 无安全风险。日志内容仅为插件目录路径,不含敏感信息。降低日志级别减少了信息暴露面。 💡 改进建议代码示例// 当前变更已足够,无需额外修改
// src/loader/trayplugingroups.cpp - allPluginPaths() 函数
// 将 qCWarning 改为 qCDebug 是合理的变更:
// 遗留的 quick-trays 插件目录不存在是预期行为,
// 不应产生 Warning 级别日志干扰用户。
qCDebug(loaderLog) << "The plugin directory does not exist:" << pluginDir;本报告由 AI 代码审查工具自动生成 |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
trayplugingroups.cpp still scanned /usr/lib/dde-dock/plugins/quick-trays/, a legacy directory of the old dde-shell widget tray plugins that no package has provided since they were removed in dde-shell 9fcba120 (2024-07). On any modern install the directory never exists, so every dde-tray-loader instance (4 --check-group + 3 --group processes per dock start) printed one "The plugin directory does not exist" warning each time. Remove the entry from pluginDirs(); grouping is by plugin file name and path-agnostic, so no other code is affected.
修复:从扫描列表删除遗留的 quick-trays 插件目录
trayplugingroups.cpp 仍扫描 /usr/lib/dde-dock/plugins/quick-trays/,该目录 属于旧 dde-shell widget 托盘插件,自 dde-shell 9fcba120(2024-07)删除后 无任何包提供,现代系统上恒不存在,导致每次 dock 启动的 4 个
--check-group 与 3 个 --group 进程各打印一条 "The plugin directory does not exist" 告警。从 pluginDirs() 移除该条目;分组按插件文件名匹配、 与路径无关,无其他代码受影响。
PMS: TASK-394335
Summary by Sourcery
Bug Fixes: