Repository navigation
fix: handle raw app IDs ending in .desktop correctly - #830
Merged
deepin-bot[bot] merged 1 commit intoOct 23, 2026
Merged
Conversation
1. Add indexFromAppId() to match raw app IDs directly via DesktopIdRole 2. Fix indexFromDesktopId() to compare the given ID against the normalized desktop ID instead of normalizing both sides, which double- appended .desktop to IDs already ending in .desktop 3. Use indexFromAppId() in ItemArrangementProxyModel when handling dnd drop IDs from dde-shell 4. Document the distinction between raw app IDs and desktop file IDs 5. Update tests to cover IDs that already include a .desktop suffix The previous normalization applied to both sides of the comparison caused IDs ending in .desktop to resolve incorrectly. Raw app IDs from dde-shell differ from desktop file IDs, so a dedicated lookup is needed. Influence: 1. Test drag-and-drop of apps whose IDs end in .desktop into folders 2. Verify folder categorization works for such apps 3. Test indexFromAppId with raw IDs and indexFromDesktopId with desktop file IDs 4. Verify normalizedDesktopId returns the expected .desktop.desktop result for suffixed IDs 5. Test lookup for IDs without .desktop suffix still works 6. Run search filter proxy model tests to confirm no regressions fix: 正确处理以 .desktop 结尾的原始应用 ID 1. 新增 indexFromAppId(),通过 DesktopIdRole 直接匹配原始应用 ID 2. 修复 indexFromDesktopId(),将给定 ID 与归一化后的桌面文件 ID 比较,而 不是对双方都归一化,避免对已带 .desktop 后缀的 ID 重复追加后缀 3. 在 ItemArrangementProxyModel 处理来自 dde-shell 的拖放 ID 时改 用 indexFromAppId() 4. 补充原始应用 ID 与桌面文件 ID 区别的注释 5. 更新测试,覆盖已带 .desktop 后缀的 ID 场景 此前的归一化对比较双方都执行,导致以 .desktop 结尾的 ID 解析错误。来自 dde-shell 的原始应用 ID 与桌面文件 ID 不同,因此需要专门的查找方法。 Influence: 1. 测试将以 .desktop 结尾 ID 的应用拖放至文件夹 2. 验证此类应用的文件夹分类功能 3. 测试 indexFromAppId 处理原始 ID、indexFromDesktopId 处理桌面文件 ID 4. 验证 normalizedDesktopId 对带后缀 ID 返回预期的 .desktop.desktop 结果 5. 测试不带 .desktop 后缀的 ID 查找仍正常 6. 运行搜索过滤代理模型测试,确认无回归 PMS: BUG-396959
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR fixes application lookup for raw IDs ending in .desktop by introducing a dedicated exact-match API, correcting one-sided desktop-ID normalization, and using the raw-ID path for dde-shell drag-and-drop categorization. Documentation and regression tests now cover suffixed and unsuffixed IDs, normalization behavior, and renamed model items. Sequence diagram for raw app ID drag-and-drop categorizationsequenceDiagram
participant DdeShell
participant ItemArrangementProxyModel
participant AppsModel
participant Folder
DdeShell->>ItemArrangementProxyModel: commitDndOperation(dropId, dragId)
ItemArrangementProxyModel->>Folder: appendPage(normDropId, normDragId)
ItemArrangementProxyModel->>AppsModel: indexFromAppId(dropId)
AppsModel-->>ItemArrangementProxyModel: QModelIndex
ItemArrangementProxyModel->>AppsModel: data(DDECategoryRole)
ItemArrangementProxyModel->>Folder: create or categorize folder item
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
BLumia
approved these changes
Oct 23, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia, wjyrich 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 |
Contributor
Author
|
/forcemerge |
|
This pr force merged! (status: behind) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous normalization applied to both sides of the comparison caused IDs ending in .desktop to resolve incorrectly. Raw app IDs from dde-shell differ from desktop file IDs, so a dedicated lookup is needed.
Influence:
fix: 正确处理以 .desktop 结尾的原始应用 ID
此前的归一化对比较双方都执行,导致以 .desktop 结尾的 ID 解析错误。来自
dde-shell 的原始应用 ID 与桌面文件 ID 不同,因此需要专门的查找方法。
Influence:
PMS: BUG-396959
Summary by Sourcery
Correct application ID resolution for IDs ending in .desktop by distinguishing raw app ID lookups from desktop file ID lookups.
New Features:
Bug Fixes:
Enhancements:
Tests: