Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia 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 GuideFixes launching for applications whose IDs themselves end in Sequence diagram for launching applications with desktop-suffixed IDssequenceDiagram
participant DesktopIntegration
participant AppMgr
participant DBus
participant AppInfo
DesktopIntegration->>AppMgr: launchApp(desktopId, token)
AppMgr->>DBus: applicationObjectPath(desktopId)
DBus-->>AppMgr: org/telegram/desktop
alt AppMgr launch fails
DesktopIntegration->>AppsModel: normalizedDesktopId(desktopId)
AppsModel-->>DesktopIntegration: normalized ID
DesktopIntegration->>AppInfo: launchByDesktopId(normalized ID)
end
Flow diagram for raw and normalized desktop ID usageflowchart LR
SourceID[Raw desktop ID]
Normalize[AppsModel.normalizedDesktopId]
DBusPath[AppMgr.applicationObjectPath]
AppInfoAPI[AppInfo methods]
ModelRole[DesktopIdRole returns raw ID]
ModelCompare[Model and proxy comparisons]
SourceID --> ModelRole
SourceID --> DBusPath
SourceID --> Normalize
Normalize --> AppInfoAPI
Normalize --> ModelCompare
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
1. Stop stripping .desktop suffix in applicationObjectPath() 2. Return raw desktop ID from AppsModel::data(DesktopIdRole) 3. Add static normalizedDesktopId() for consistent ID normalization 4. Update all proxy models and desktop integration to use normalized IDs 5. Update test assertions to expect raw desktop IDs Log: Fixed launcher unable to start apps with .desktop suffix in app ID Influence: 1. Test launching apps with .desktop suffix in app ID (e.g. org.telegram.desktop) 2. Test launching apps without .desktop suffix in app ID 3. Test app search, sort, and favorite functions still work correctly 4. Test app uninstall and dock operations fix: 修复应用名含 .desktop 后缀的应用无法启动的问题 1. 停止在 applicationObjectPath() 中去除 .desktop 后缀 2. AppsModel::data(DesktopIdRole) 返回原始桌面 ID 3. 新增静态 normalizedDesktopId() 方法统一归一化处理 4. 更新所有代理模型和桌面集成模块使用归一化 ID 5. 更新测试断言以匹配原始桌面 ID Log: 修复启动器无法启动应用名含 .desktop 后缀的应用程序 Influence: 1. 测试应用名含 .desktop 后缀的应用启动(如 org.telegram.desktop) 2. 测试应用名不含 .desktop 后缀的应用启动 3. 测试应用搜索、排序和收藏功能是否正常 4. 测试应用卸载和驻留栏操作 PMS: BUG-378253
a7f1ae0 to
9227e94
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
📋 PR 信息
📝 需求分析根因分析: 修复方案:
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 分析: 本次修改语法正确,逻辑清晰。核心修复在 各文件分析:
潜在问题: ✅ 未发现明显问题 建议: 无 2. 代码质量 ✅评价: 优秀 ✅ 通过 分析: 代码结构清晰,改动一致性好。 潜在问题:
建议:
3. 代码性能 ✅评价: 优秀 ✅ 通过 分析: 性能良好。 潜在问题: ✅ 未发现明显问题 建议: 无 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全分析: 存在0个安全漏洞。本次修改不涉及用户输入处理、网络通信、文件系统操作等安全敏感区域。DBus 路径构建使用 漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个 安全检查项:
安全漏洞详情: 建议: 无 💡 改进建议代码示例// src/models/itemarrangementproxymodel.cpp - onSourceModelChanged()
// 建议移除无效的 findItem() 调用
// 修改前(当前代码):
if (folder == -1) {
findItem(normalizedId); // 返回值未使用,无效调用
// ... 后续逻辑
}
// 修改后(建议):
if (folder == -1) {
// 直接进行后续逻辑,无需调用 findItem
// ... 后续逻辑
}📊 评分汇总
本报告由 AI 代码审查工具自动生成 审查时间:2026-09-23 13:33:00 |
Root Cause
applicationObjectPath()inappmgr.cppunconditionally strips the.desktopsuffix from app IDs. For apps likeorg.telegram.desktop, this produces the wrong DBus pathorg/telegraminstead oforg/telegram/desktop, causing the launcher to fail to start such applications.Changes
src/ddeintegration/appmgr.cpp: Stop stripping.desktopsuffix inapplicationObjectPath()— pass the raw desktop ID to the DBus path.src/models/appsmodel.h: MovenormalizedDesktopId()topublic staticso it can be used across modules.src/models/appsmodel.cpp:data(DesktopIdRole)now returns the raw source ID (no normalization).indexFromDesktopId()normalizes both sides internally for comparison.normalizedDesktopId()calls updated toAppsModel::normalizedDesktopId().src/models/favoritedproxymodel.cpp: Wrap all desktop ID usages withAppsModel::normalizedDesktopId().src/models/itemarrangementproxymodel.cpp: Wrap all ID comparisons and lookups withAppsModel::normalizedDesktopId().src/models/frequentlyusedproxymodel.cpp: Add#include "appsmodel.h", wrap both IDs withAppsModel::normalizedDesktopId().desktopintegration.cpp: Use raw IDs forAppMgrmethods that callapplicationObjectPath(), and normalized IDs forAppInfomethods that need.desktopsuffix.tests/searchfilterproxymodeltest.cpp: Update test assertions to expect raw desktop IDs (without.desktopsuffix) fromdata(DesktopIdRole).Related
Summary by Sourcery
Preserve complete desktop IDs during application launching while normalizing IDs consistently for model and metadata operations.
Bug Fixes:
.desktopby preserving the full ID in DBus object paths.Enhancements:
Tests: