Conversation
Revert the theme-icon deferral introduced in commit 521429e ("fix(appmgr): defer apps until theme icon resolves"). That change extended waitForIcon() to also defer apps whose theme-name icon QIcon::fromTheme() cannot resolve at startup, causing a large number of apps to be queued and released only every 3s (up to 120s timeout) — visible as slow/progressive app loading in windowed launcher mode. Restore the original behaviour: only defer apps with absolute-path icons whose file does not exist yet (bug-347859). Theme icons that become available after startup are handled by the existing DFileWatcherManager + updateIconData() mechanism in AppsModel. Log: Revert theme icon defer logic to fix slow progressive app loading in windowed launcher. PMS: BUG-372641 Influence: Windowed launcher now shows all apps immediately instead of progressive loading. fix(appmgr): 回退主题图标延迟逻辑以修复应用加载缓慢 回退 commit 521429e("fix(appmgr): defer apps until theme icon resolves")引入的主题图标延迟逻辑。该改动扩展了 waitForIcon(), 使主题图标名在 QIcon::fromTheme() 中暂时无法解析的应用也被延迟, 导致启动器启动时大量应用被放入待处理队列,每 3 秒才逐步释放 (最长 120 秒超时)——在窗口模式下表现为应用加载缓慢和渐进式滚动效果。 恢复原有行为:仅延迟绝对路径图标文件尚不存在的应用(bug-347859)。 主题图标延迟可用的问题由 AppsModel 中现有的 DFileWatcherManager + updateIconData() 机制处理。 Log: 回退主题图标延迟逻辑,修复窗口模式启动器应用渐进式加载缓慢问题。 PMS: BUG-372641 Influence: 窗口模式启动器现在一次性显示所有应用,不再渐进式加载。
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy 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 guide (collapsed on small PRs)Reviewer's GuideReverts theme-icon startup deferral so launcher apps are displayed immediately, while retaining deferral for missing absolute-path icons and the existing watcher-based theme icon refresh mechanism. Sequence diagram for launcher icon loading after startupsequenceDiagram
participant AppsModel
participant AppMgr
participant DFileWatcherManager
participant IconData
AppsModel->>AppMgr: waitForIcon(desktopId, iconName)
alt Theme-name icon or available icon
AppMgr-->>AppsModel: false
else Missing absolute-path icon
AppMgr-->>AppsModel: defer app
loop Every 3 seconds
AppMgr->>AppMgr: checkPendingAppItems()
AppMgr->>AppMgr: QFileInfo::exists(iconName)
end
end
DFileWatcherManager->>IconData: updateIconData()
Note over DFileWatcherManager,IconData: Refreshes theme icons when icon-theme.cache changes
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
📝 提交信息
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅通过 具体分析:
潜在问题: 建议: 代码语法正确,逻辑清晰,无需修改 2. 代码质量 ✅评价: 优秀 ✅通过 具体分析:
潜在问题: 建议: 代码结构清晰,移除了不再使用的头文件和复杂逻辑,良好实践 3. 代码性能 ✅评价: 优秀 ✅通过 具体分析:
潜在问题: 建议: 移除了QIcon::fromTheme()和IconUtils::tryUpdateIconCache()调用,减少了不必要的计算开销,性能表现良好 4. 代码安全 🔒评价: 优秀 ✅通过
安全漏洞详情: 具体分析:
建议: 无安全风险,代码变更仅涉及图标显示逻辑,不涉及用户输入处理或敏感信息 📋 审查结论本次 PR 回退了 commit
主题图标延迟可用的问题(bug-371833)由现有的 本报告由 AI 代码审查工具自动生成 |
|
该问题已修复,关闭此PR |
Root Cause Analysis
Commit
521429e("fix(appmgr): defer apps until theme icon resolves") extendedwaitForIcon()to also defer apps whose theme-name iconQIcon::fromTheme()cannot resolve at startup. When the icon theme is not yet fully initialized during launcher startup, a large number of apps get queued and released only every 3 seconds (up to 120s timeout), causing visible slow/progressive app loading in windowed launcher mode.Key evidence:
appmgr.cpp:230-231— theQIcon::fromTheme(iconName).isNull()check on theme icon names was added by521429e;appsmodel.cpp:48-56—DFileWatcherManageralready monitorsicon-theme.cachechanges and triggersupdateIconData()to refresh icons, making the deferral unnecessary.Fix
Revert the theme-icon deferral logic introduced in commit
521429e.waitForIcon()now only defers apps with absolute-path icons whose file does not exist yet (original bug-347859 behavior).checkPendingAppItems()only checksQFileInfo::exists()and no longer callsIconUtils::tryUpdateIconCache(). Timeout restored from 40 (120s) to 20 (60s). The#include "iconutils.h"and#include <QIcon>headers removed as they were only used by the reverted code. Theme icons that become available after startup are handled by the existingDFileWatcherManager+updateIconData()mechanism.Change Safety Assessment
Code Safety
521429e(2026-08-11) for BUG-371833; this change is a symmetric revert to the pre-521429e behavior which was already verified. The original bug-347859 fix (absolute-path icon deferral) is preserved unchanged.DFileWatcherManager+updateIconData()mechanism, which predates521429e. The highest-risk callerAppsModel::shouldDelaySourceIndex()logic is unchanged — only the deferral condition narrows.Business Impact Scope
Affected module: launcher app list display in windowed mode. After the fix, all apps appear immediately on launcher startup instead of loading progressively. Theme icons that become available after startup are still refreshed via the icon cache watch mechanism. Absolute-path icons that don't exist yet are still deferred (BUG-347859 scenario preserved).
Verification Suggestion
Verify that the windowed launcher shows all apps immediately on startup with no progressive scrolling effect. Confirm that theme icons display correctly after theme initialization, and that apps with missing absolute-path icons are still deferred as before.
根因分析
commit
521429e("fix(appmgr): defer apps until theme icon resolves")扩展了waitForIcon(),使主题图标名在QIcon::fromTheme()中暂时无法解析的应用也被延迟显示。启动器启动时图标主题尚未完全初始化,大量应用被放入待处理队列,每 3 秒才逐步释放(最长 120 秒超时),导致窗口模式下应用加载缓慢和渐进式滚动效果。关键证据:
appmgr.cpp:230-231—QIcon::fromTheme(iconName).isNull()主题图标名检查由521429e新增;appsmodel.cpp:48-56—DFileWatcherManager已监听icon-theme.cache变化并触发updateIconData()刷新图标,延迟逻辑并非必要。修复方案
回退 commit
521429e引入的主题图标延迟逻辑。waitForIcon()恢复为仅延迟绝对路径图标文件不存在的应用(bug-347859 原逻辑)。checkPendingAppItems()仅检查QFileInfo::exists(),不再调用IconUtils::tryUpdateIconCache()。超时从 40 次(120s)恢复为 20 次(60s)。移除仅被回退代码使用的#include "iconutils.h"和#include <QIcon>。主题图标延迟可用由现有的DFileWatcherManager+updateIconData()机制处理。改动安全评估
代码安全评估
521429e(2026-08-11)为 BUG-371833 引入;本次改动为对称回退到 521429e 之前已验证的行为。bug-347859 原修复(绝对路径图标延迟)保持不变。DFileWatcherManager+updateIconData()机制覆盖,该机制在521429e之前已存在。调用方AppsModel::shouldDelaySourceIndex()逻辑不变,仅延迟条件缩小。业务影响范围
受影响模块:启动器窗口模式应用列表显示。修复后启动器启动时所有应用一次性完整显示,不再渐进式加载。主题图标延迟可用仍通过图标缓存监听机制刷新。绝对路径图标暂不存在的应用仍被延迟显示(BUG-347859 场景保留)。
验证建议
验证窗口模式启动器启动后应用列表一次性完整显示,无渐进式滚动效果。确认主题初始化后图标正常显示,绝对路径图标缺失的应用仍正常延迟显示。
Summary by Sourcery
Restore responsive launcher startup by reverting unnecessary theme-icon deferral while preserving delayed handling for missing absolute-path icons.
Bug Fixes:
Enhancements:
Chores: