Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Launchpad crashes. #252

Merged
merged 1 commit into from
May 7, 2024
Merged

Conversation

robertkill
Copy link
Contributor

When there is only one application in the group and it is dragged and dropped within the same group, the drag and drop process is not handled.

log: as title
issue: linuxdeepin/developer-center#8384

@robertkill robertkill force-pushed the master branch 2 times, most recently from f0a771c to 06f61b0 Compare May 7, 2024 03:25
src/models/itemspage.cpp Outdated Show resolved Hide resolved
When there is only one application in the group and it is dragged and dropped within the same group, the drag and drop process is not handled.

log: as title
issue: linuxdeepin/developer-center#8384
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • ItemArrangementProxyModel::commitDndOperation函数中,增加了对源文件夹和目标文件夹是否相同的判断,避免了重复移除项目item的操作。
  • 新增了ItemsPage::itemCount函数,用于计算总项目数量,提高了代码的可读性和性能。

是否建议立即修改:

  • 否,提交中的更改已经包括了一些改进,没有紧急需要修改的问题。但是,建议进行以下几点改进:
    • 确保所有新增加的逻辑都经过了充分的测试,特别是对于文件夹操作和项目移动的测试。
    • 检查是否有必要对ItemsPage::itemCount函数进行优化,例如使用静态编译指令或者缓存结果以提高性能。
    • 考虑对ItemArrangementProxyModel::commitDndOperation函数中的多次重复调用进行优化,例如通过缓存或早返回结果来减少不必要的循环。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, robertkill

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@robertkill robertkill merged commit c5778f7 into linuxdeepin:master May 7, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants