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 bugs #2545

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dengzhongyuan365-dev
Copy link
Contributor

Fix the first mount login SMB sharing directory to view attributes, attribute page display the sharing management settings.
Adjust the keyboard positioning logic of the drop-down box.

When using keyboard positioning for the first time, use the current mouse hover as the starting position.

Log: Adjust the keyboard positioning logic of the drop-down box.

Bug: https://pms.uniontech.com/bug-view-296835.html
…es, attribute page display the sharing management settings.

The path /media for the first mount in V25 is a relative path. Use the absolute path to determine whether the mount point exists.

Log: Fix the first mount login SMB sharing directory to view attributes, attribute page display the sharing management settings.

Bug: https://pms.uniontech.com/bug-view-296579.html
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dengzhongyuan365-dev

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

@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 代码重复

    • dirshare.cpp文件中,fileInfo.exists()fileInfo.canonicalFilePath()的检查可以合并,以减少代码重复。
    • folderlistwidget.cpp文件中,currentIndex.isValid()的检查和hoverIndex.isValid()的检查可以合并,以减少代码重复。
  2. 错误处理

    • dirshare.cpp文件中,如果fileInfo.exists()返回false,应该有一个错误日志或者用户提示,告知用户文件不存在。
    • folderlistwidget.cpp文件中,如果currentIndexhoverIndex都无效,应该有一个错误日志或者用户提示,告知用户没有有效的索引。
  3. 性能优化

    • folderlistwidget.cpp文件中,mapFromGlobal(QCursor::pos())QCursor::pos()可能会频繁调用,建议将其结果缓存起来,避免重复调用。
  4. 代码可读性

    • folderlistwidget.cpp文件中,findAndSelectMatch函数的调用应该有一个注释说明其作用,以便其他开发者理解。
  5. 安全性

    • dirshare.cpp文件中,url.toLocalFile()可能会抛出异常,应该使用try-catch块来处理可能的异常情况。
  6. 代码风格

    • folderlistwidget.cpp文件中,else语句块应该缩进,以保持代码的一致性和可读性。
  7. 注释

    • folderlistwidget.cpp文件中,// 如果没有激活选中某一项的时候,就以鼠标悬浮所在项为基准去往后查找注释应该更详细地说明其逻辑和目的。

综上所述,代码需要改进的地方包括减少重复代码、增加错误处理、优化性能、提高代码可读性、增强安全性、保持代码风格一致以及添加必要的注释。

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 10, 2025

TAG Bot

New tag: 6.5.24
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #2547

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 10, 2025

TAG Bot

New tag: 6.5.25
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #2549

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.

2 participants