Repository navigation
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Reviewer's GuideThe PR removes process-lifetime warnings, handles startup races by waiting for ConfigManager and refetching state, and fixes dock color warnings by pinning the component to its supported Crystal palette family. Appearance1's related startup race is intentionally left to the session D-Bus dependency graph. Sequence diagram for startup-race configuration refetchsequenceDiagram
participant Applet
participant ConfigManager
participant ServiceWatcher
participant DConfig
Applet->>ConfigManager: isServiceRegistered()
alt ConfigManager not registered
Applet-->>Applet: keep default state
ConfigManager-->>ServiceWatcher: serviceRegistered()
ServiceWatcher->>Applet: sync()
Applet->>DConfig: create()
DConfig-->>Applet: fetch configured state
else ConfigManager registered
Applet->>DConfig: create()
DConfig-->>Applet: fetch configured state
end
Sequence diagram for safe asynchronous process cleanupsequenceDiagram
participant MultiTaskView
participant KWinQuery as QProcess
participant TaskManager
participant Gio as QProcess
MultiTaskView->>KWinQuery: start()
KWinQuery-->>MultiTaskView: finished()
alt MultiTaskView still exists
MultiTaskView->>KWinQuery: readAllStandardOutput()
end
MultiTaskView->>KWinQuery: deleteLater()
TaskManager->>Gio: waitForFinished(1000)
alt Gio still running
TaskManager->>Gio: kill()
TaskManager->>Gio: waitForFinished(1000)
end
Flow diagram for dock Crystal palette selectionflowchart LR
Item[Dock app item] --> Selector[ColorSelector]
Selector --> Family[Palette.CrystalColor]
Family --> Colors[backgroundColor and border colors]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
a787cc2 to
09c6592
Compare
09c6592 to
1451232
Compare
| process->deleteLater(); | ||
| }); | ||
| connect(process, &QProcess::finished, process, &QProcess::deleteLater); | ||
| connect(process, &QProcess::errorOccurred, process, [process](QProcess::ProcessError error) { |
There was a problem hiding this comment.
这意思是,发送了errorOccureed信号,就不发送finished信号了?
There was a problem hiding this comment.
不是。errorOccurred 和 finished 不是互斥的,只有 FailedToStart 是例外:
- FailedToStart:进程没起来,只发 errorOccurred(FailedToStart),不会发 finished;
- Crashed:先发 errorOccurred(Crashed),随后仍发 finished(..., CrashExit);
- Timedout/ReadError/WriteError:可能在进程还在运行时发 errorOccurred,finished 仍可能之后发出。
所以这里只在 errorOccurred 里处理 FailedToStart,其他错误统一由 finished 做 deleteLater;如果对所有 errorOccurred 都 deleteLater,Timedout 等场景可能在进程还在运行时析构 QProcess,反而重新触发 "Destroyed while process ... is still running"。
Qt 6.8 实测:FailedToStart 只有 errorOccurred;Crashed 是 errorOccurred + finished(CrashExit)。注释也已改成更准确的表述。
1451232 to
e16f6bf
Compare
AppItemBackground overrides the base AppletItemBackground palettes with crystal-only definitions, dropping the base's common fallback. While the inherited ColorSelector family is still CommonColor (for example during dock item creation), getColor() cannot resolve the crystal-only entries, and reads of backgroundColor, insideBorderColor, outsideBorderColor and the active* variants log "ColorSelector: The ... is an invalid color". Add common transparent fallbacks to the normal group of the overridden palettes, matching AppletItemBackground. The crystal rendering used by the dock is unchanged. dock AppItemBackground 颜色告警修复: AppItemBackground 覆盖 AppletItemBackground 的 palette 时只定义了 crystal 颜色族,丢掉了基类的 common 兜底。当继承的 ColorSelector family 仍为 CommonColor(例如 dock item 创建期间)时,getColor() 无法 解析仅含 crystal 的条目,读取 backgroundColor、insideBorderColor、 outsideBorderColor 及 active* 系列时会打印 "ColorSelector: ... is an invalid color"。现在为各覆盖 palette 的 normal 组补充 common 透明兜底,与 AppletItemBackground 保持一致; dock 正常的 crystal 渲染不变。 PMS: TASK-394335
e16f6bf to
ff973df
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例本报告由 AI 代码审查工具自动生成 |
AppItemBackground overrides the base AppletItemBackground palettes with crystal-only definitions, dropping the base's common fallback. While the inherited ColorSelector family is still CommonColor (for example during dock item creation), getColor() cannot resolve the crystal-only entries, and reads of backgroundColor, insideBorderColor, outsideBorderColor and the active* variants log "ColorSelector: The ... is an invalid color". Add common transparent fallbacks to the normal group of the overridden palettes, matching AppletItemBackground. Crystal rendering used by the dock is unchanged.
The previous W075 QProcess lifetime change was withdrawn after review: if the applet is already gone, dde-shell itself has exited or crashed, so the QProcess destructor warning should remain visible for diagnosis instead of being suppressed. The related QPointer/QProcess connection split and the queryTrashCount()/gio change are no longer part of this PR.
The ConfigManager and Appearance1 startup races (W078/W079/W049) are not guarded here: they share the same root cause as the dde-launchpad issue #826 and are left to the dde-session D-Bus dependency DAG instead of adding consumer-side workarounds.
dock AppItemBackground 颜色告警修复:
AppItemBackground 覆盖 AppletItemBackground 的 palette 时只定义了 crystal 颜色族,丢掉了基类的 common 兜底。当继承的 ColorSelector family 仍为 CommonColor(例如 dock item 创建期间)时,getColor() 无法解析仅含 crystal 的条目,读取 backgroundColor、insideBorderColor、outsideBorderColor 及 active* 系列时会打印 "ColorSelector: ... is an invalid color"。现在为各覆盖 palette 的 normal 组补充 common 透明兜底,与 AppletItemBackground 保持一致;dock 正常的 crystal 渲染不变。
按评审讨论,原 W075 的 QProcess 生命周期改动已撤回:applet 已不存在说明 dde-shell 本身已退出或崩溃,此时应保留 QProcess 析构 warning 作为诊断信息,而不是静默它。相关的 QPointer/QProcess 连接拆分以及 queryTrashCount()/gio 改动均不再包含在本 PR 中。
ConfigManager 与 Appearance1 启动竞态(W078/W079/W049)不在本提交中做消费者侧守卫:它们与 dde-launchpad issue #826 同根因,统一由 dde-session 的 D-Bus 依赖 DAG 处理。
PMS: TASK-394335
Summary by Sourcery
Bug Fixes: