Skip to content

Conversation

@Kakueeen
Copy link

@Kakueeen Kakueeen commented Aug 6, 2025

as title

Log: fix bug
Bug: https://pms.uniontech.com/bug-view-327739.html

Summary by Sourcery

Bug Fixes:

  • Enable exporting images in AVIF and HEIF formats by updating the exportFormatMapping table

@sourcery-ai
Copy link

sourcery-ai bot commented Aug 6, 2025

Reviewer's Guide

Extend image export functionality by adding AVIF and HEIF formats to the export format mapping in CExportImageDialog.

File-Level Changes

Change Details Files
Add AVIF and HEIF export formats to the format mapping
  • Insert mapping entry for AVIF at index 8
  • Insert mapping entry for HEIF at index 9
src/widgets/dialog/cexportimagedialog.cpp

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Kakueeen - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 代码格式

    • 新增的{8, "avif"}, {9, "heif"}格式与之前的项一致,没有问题。
  2. 代码质量

    • exportFormatMapping是一个常量映射,建议将其定义为const,以避免意外修改。
    • 如果exportFormatMapping的值不会改变,建议将其定义为constexpr,以提高编译时的性能。
  3. 代码性能

    • 由于exportFormatMapping是一个静态常量,其初始化在程序启动时完成,对性能的影响微乎其微,无需优化。
  4. 代码安全

    • 没有发现明显的安全问题。
  5. 其他建议

    • 如果exportFormatMapping的键值对会频繁变动,建议将其存储在配置文件中,以便于管理和修改。
    • 考虑到未来可能需要支持更多的图像格式,建议使用配置文件或数据库来管理这些格式,而不是硬编码在代码中。

综上所述,代码改动本身没有问题,但建议考虑将exportFormatMapping定义为constexpr,并考虑使用配置文件来管理图像格式。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Kakueeen, lzwind

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

Details 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

@Kakueeen
Copy link
Author

Kakueeen commented Aug 6, 2025

/forcemerge

@deepin-bot deepin-bot bot merged commit f3af43d into linuxdeepin:develop/snipe Aug 6, 2025
14 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