Skip to content

fix: [build] build error#336

Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:release/eaglefrom
LiHua000:release/eagle
Dec 22, 2025
Merged

fix: [build] build error#336
deepin-bot[bot] merged 1 commit intolinuxdeepin:release/eaglefrom
LiHua000:release/eagle

Conversation

@LiHua000
Copy link
Copy Markdown
Contributor

@LiHua000 LiHua000 commented Dec 22, 2025

Log: as title

Summary by Sourcery

Bug Fixes:

  • Fix build-time DTK version check by updating the upper bound for the custom watermark interface from 5.5.0 to 5.6.9.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Dec 22, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the DTK version range used to detect the customized watermark interface so that builds succeed with newer DTK versions while keeping behavior consistent with documentation.

File-Level Changes

Change Details Files
Update DTK version range condition for determining the custom watermark interface.
  • Change the upper bound of the DTK_VERSION preprocessor check from 5.5.0.0 to 5.6.9.0 to match the documented watermark interface introduction version.
  • Keep the lower bound (5.4.42.7) and surrounding watermark initialization logic unchanged so only the version gating behavior is modified.
  • Align the in-code comment describing the version condition with the updated DTK_VERSION_CHECK expression.
src/main.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
Copy Markdown

@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 - 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.

@LiHua000 LiHua000 force-pushed the release/eagle branch 2 times, most recently from da62671 to 09b6f3f Compare December 22, 2025 09:05
@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

我来对这个diff进行仔细分析:

  1. 代码逻辑分析:

    • 这段代码是在处理水印功能,根据DTK版本的不同使用不同的水印接口
    • 主要修改是将版本判断的上限从5.5.0.0调整到5.6.9.0
    • 这个修改是合理的,因为注释中提到主线水印接口是在5.6.9之后引入的
  2. 代码质量:

    • 代码结构清晰,注释完整
    • 版本判断逻辑明确
    • 使用了DTK_VERSION_CHECK宏进行版本比较,这是标准做法
  3. 代码性能:

    • 这个修改不影响性能,只是编译时的版本判断
    • 运行时没有额外的性能开销
  4. 代码安全:

    • 版本判断使用编译时宏,安全可靠
    • 没有引入新的安全隐患

改进建议:

  1. 注释可以更精确一些,建议修改为:
// 因此,判断定制线:存在水印接口,版本不低于 5.4.42.7 且低于主线水印接口引入版本 5.6.9
  1. 为了更好的可维护性,建议将版本号定义为常量:
#define WATERMARK_INTERFACE_VERSION_MIN DTK_VERSION_CHECK(5, 4, 42, 7)
#define WATERMARK_INTERFACE_VERSION_MAX DTK_VERSION_CHECK(5, 6, 9, 0)

#if WATERMARK_INTERFACE_VERSION_MIN <= DTK_VERSION && DTK_VERSION < WATERMARK_INTERFACE_VERSION_MAX
  1. 考虑添加日志输出,以便在调试时能够确定当前使用的是哪个版本的水印接口:
#if WATERMARK_INTERFACE_VERSION_MIN <= DTK_VERSION && DTK_VERSION < WATERMARK_INTERFACE_VERSION_MAX
    qDebug() << "Using custom watermark interface";
#else
    qDebug() << "Using mainline watermark interface";
#endif

总的来说,这是一个合理的版本兼容性修改,主要是为了适配DTK框架的水印接口变更。修改后的代码能够更好地支持不同版本的DTK框架。

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@LiHua000
Copy link
Copy Markdown
Contributor Author

/merge

@deepin-bot deepin-bot bot merged commit 84eb9ce into linuxdeepin:release/eagle Dec 22, 2025
28 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