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: The preview image is not displayed in the properties window of the file in trash #2029

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

liyigang1
Copy link
Contributor

The interface for calling the file of fileinfo to obtain the thumbnail

Log: The preview image is not displayed in the properties window of the file in trash
Bug: https://pms.uniontech.com/bug-view-260617.html

…he file in trash

The interface for calling the file of fileinfo to obtain the thumbnail

Log: The preview image is not displayed in the properties window of the file in trash
Bug: https://pms.uniontech.com/bug-view-260617.html
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • setFileIcon函数中,对localUrl的访问应该在fileInfo->canAttributes(CanableInfoType::kCanRedirectionFileUrl)检查之后,以确保在调用fileInfo->urlOffileInfo不为空。
  • fileInfo->extendAttributes(ExtInfoType::kFileThumbnail).value<QIcon>()可能会导致空指针异常,应该添加空指针检查。
  • icon.isNull()的检查应该在icon = QPixmap::fromImage(img);之后,以确保在尝试设置fileIconpixmap之前icon不为空。
  • icon.pixmap(128, 128).scaled的调用应该在icon不为空的前提下进行,以避免潜在的空指针异常。

是否建议立即修改:

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: liyigang1, max-lvs

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

@max-lvs max-lvs merged commit 9adc344 into linuxdeepin:master Jun 19, 2024
22 of 23 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