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: 修复调用选择文件对话框时无法选择文件夹 #53

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

Whale107
Copy link
Contributor

directory字段未更新, 判断成选择文件

Log:
Task: https://pms.uniontech.com/task-view-360597.html Influence: 拉起的选择文件对话框

directory字段未更新, 判断成选择文件

Log:
Task: https://pms.uniontech.com/task-view-360597.html
Influence: 拉起的选择文件对话框
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • 在新增代码中,直接使用 options.value("directory").toBool() 可能会引发异常,如果 "directory" 键不存在或其值不是有效的布尔值。应该先检查键是否存在,并且其值可以转换为布尔。
  • directory 变量在 if (directory && !options.contains(QStringLiteral("choices"))) 条件判断中被使用,但没有在此代码片段中定义。需要确保 directory 在之前的代码中已经被正确初始化。
  • 新增代码中的 if (options.contains(QStringLiteral("directory"))) 缺少对 options 字典中键值对的错误处理,如果 options 中包含无效的键,可能会导致程序崩溃。

是否建议立即修改:

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: justforlxz, Whale107

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-bot
Copy link

deepin-bot bot commented Aug 27, 2024

This pr cannot be merged! (status: unstable)

@justforlxz justforlxz merged commit eede71f into linuxdeepin:master Aug 27, 2024
16 of 17 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