Skip to content

Conversation

@deepin-ci-robot
Copy link
Contributor

@deepin-ci-robot deepin-ci-robot commented Sep 13, 2025

Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#44

Summary by Sourcery

Synchronize with linuxdeepin/dde-session-shell by adding a kebab-to-camel-case converter, integrating it for DSS_SNIPE, updating login-gesture Polish translations, and cleaning up plugin build configuration

New Features:

  • Introduce qtifyName util to convert kebab-case strings to camelCase

Enhancements:

  • Use qtifyName when emitting keyValue in LockFrame under ENABLE_DSS_SNIPE

Build:

  • Remove commented login-gesture plugin directory from plugins/CMakeLists.txt

Documentation:

  • Add Polish translations for the login-gesture plugin

@sourcery-ai
Copy link

sourcery-ai bot commented Sep 13, 2025

Reviewer's Guide

This PR synchronizes upstream changes by adding a kebab-case to camelCase conversion utility, integrating it under a feature flag in lockframe event handling, updating Polish translations for the login-gesture plugin, adjusting the CMake build to skip the login-gesture subdirectory, and refreshing the translation configuration.

Sequence diagram for keyValue emission with ENABLE_DSS_SNIPE

sequenceDiagram
    participant LockFrame
    participant "dde-daemon"
    Note over LockFrame: event(QEvent *event) called
    LockFrame->LockFrame: keyValue computed
    alt ENABLE_DSS_SNIPE defined
        LockFrame->LockFrame: qtifyName(keyValue)
        LockFrame->"dde-daemon": sendKeyValue(qtifyName(keyValue))
    else ENABLE_DSS_SNIPE not defined
        LockFrame->"dde-daemon": sendKeyValue(keyValue)
    end
Loading

Class diagram for qtifyName utility addition

classDiagram
    class public_func {
        +QString qtifyName(const QString &name)
    }
Loading

File-Level Changes

Change Details Files
Add kebab-case to camelCase conversion utility qtifyName
  • Implemented qtifyName in public_func.cpp
  • Declared and documented qtifyName in public_func.h
src/global_util/public_func.cpp
src/global_util/public_func.h
Conditionally apply qtifyName when emitting key events under ENABLE_DSS_SNIPE
  • Wrapped sendKeyValue call in lockframe.cpp with ENABLE_DSS_SNIPE guard
  • Called qtifyName for keyValue when the flag is enabled
src/dde-lock/lockframe.cpp
Update Polish translations for login-gesture plugin
  • Provided translations for Cancel and Ok
  • Completed translation for the setup completion message
plugins/login-gesture/translations/login-gesture_pl.ts
Exclude login-gesture plugin from default build
  • Commented out add_subdirectory("login-gesture") in plugins/CMakeLists.txt
plugins/CMakeLists.txt
Refresh translation configuration
  • Synchronized .tx/config with upstream settings
.tx/config

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 there - 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 deepin-ci-robot force-pushed the sync-pr-44-nosync branch 11 times, most recently from 070e443 to 5927e69 Compare September 16, 2025 09:49
@deepin-ci-robot
Copy link
Contributor Author

deepin pr auto review

代码审查报告

总体评价

这个代码差异主要涉及翻译文件更新、插件启用/禁用以及一些功能增强。整体来看,代码变更合理,但有一些可以改进的地方。

详细分析

1. .tx/config 文件变更

  • 将资源ID从名称替换为哈希值(如 dde-session-shell -> 7b6846181f3a648d8293f3e4693d31cc
  • 移除了 minimum_percmode 配置项

改进建议

  • 使用哈希值作为资源ID可以提高唯一性和稳定性,这是个好的做法
  • 建议在注释中说明移除 minimum_percmode 的原因,以便后续维护

2. CMakeLists.txt 变更

  • 启用了 login-gesture 插件(取消注释)

改进建议

  • 建议添加启用该插件的注释说明原因
  • 考虑添加条件编译,以便在不同配置下控制是否启用此插件

3. 翻译文件变更(login-gesture_fi.ts 和 login-gesture_pl.ts)

  • 完成了多个未完成的翻译
  • 简化了某些翻译文本(如移除了"salasana"(密码)相关词汇)

改进建议

  • 翻译质量很好,但要注意保持术语一致性
  • 建议建立术语表,确保同一功能在不同语言中使用一致的术语
  • 对于"ele"(gesture)的简化翻译,建议确认这是否符合当地语言习惯

4. lockframe.cpp 变更

  • 添加了条件编译代码,处理键值名称转换

改进建议

  • 代码结构清晰,但可以考虑将名称转换逻辑封装到单独的类中
  • 建议添加注释说明为什么需要这个转换(特别是针对 v25 dde-daemon 的兼容性)

5. public_func.cpp 和 public_func.h 变更

  • 添加了 qtifyName 函数,用于将 kebab-case 转换为 camelCase

改进建议

  • 函数实现简洁高效,但可以添加更多注释说明其用途和使用场景
  • 考虑添加单元测试,确保转换逻辑正确
  • 建议处理可能的边界情况,如空字符串或连续分隔符

安全性评估

  • 代码变更没有引入明显的安全风险
  • 翻译文本中没有发现潜在的注入漏洞

性能评估

  • qtifyName 函数使用了简单的字符串遍历,性能良好
  • 没有发现明显的性能瓶颈

总体建议

  1. 保持代码风格一致性
  2. 添加适当的注释,特别是解释为什么需要某些变更
  3. 考虑为新增功能添加单元测试
  4. 建立术语表,确保翻译质量一致性
  5. 对于条件编译代码,考虑将其封装以提高可维护性

这些代码变更整体上是合理和安全的,按照上述建议进行改进后,代码质量会进一步提升。

Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#44
@deepin-ci-robot
Copy link
Contributor Author

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, deepin-ci-robot, yixinshark

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

@BLumia BLumia merged commit 3cd37b4 into master Sep 18, 2025
25 of 29 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.

4 participants