Skip to content

Conversation

@add-uos
Copy link
Contributor

@add-uos add-uos commented Sep 23, 2025

Fixed typos in method name and variable comments to ensure consistent and correct spelling:

  • Changed parserVendor() to parseVendor() across both declaration and implementation
  • Fixed "heigth" to "height" in method comments and variable descriptions

Log: Fix spelling errors in EDID parser
Change-Id: Ia15db2bf96f2e145718981592e69dca3e740172c

Summary by Sourcery

Fix typos in EDIDParser by renaming parserVendor to parseVendor and correcting height-related misspellings in code comments and variables

Bug Fixes:

  • Rename parserVendor() to parseVendor() across declaration, implementation, and calls
  • Correct 'heigth' typo to 'height' in method comments, variable descriptions, and documentation
  • Update height() return comment to specify 'screen height'

Fixed typos in method name and variable comments to ensure consistent
and correct spelling:
- Changed parserVendor() to parseVendor() across both declaration and
implementation
- Fixed "heigth" to "height" in method comments and variable
descriptions

Log: Fix spelling errors in EDID parser
Change-Id: Ia15db2bf96f2e145718981592e69dca3e740172c
@sourcery-ai
Copy link

sourcery-ai bot commented Sep 23, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Renamed the parserVendor method to parseVendor across declarations, definitions, and call sites, and corrected the spelling of “height” in comments and member descriptions to ensure consistency.

Class diagram for EDIDParser after typo corrections

classDiagram
class EDIDParser {
    +int height()
    -void parseVendor()
    -void parseReleaseDate()
    QString m_MonitorName
    bool m_LittleEndianMode
    int m_Width
    int m_Height
    QStringList m_ListEdid
    QMap<QString, QString> m_MapCh
}
Loading

Flow diagram for method renaming from parserVendor to parseVendor

flowchart TD
    A["EDIDParser::setEdid()"] --> B["parseVendor()"]
    B --> C["parseReleaseDate()"]
    C --> D["Other parsing steps..."]
Loading

File-Level Changes

Change Details Files
Renamed parserVendor() to parseVendor()
  • Updated method declaration in EDIDParser.h
  • Renamed implementation signature in EDIDParser.cpp
  • Replaced call site invocation from parserVendor() to parseVendor()
deepin-devicemanager/src/Tool/EDIDParser.h
deepin-devicemanager/src/Tool/EDIDParser.cpp
Corrected spelling of “height” in comments and variable descriptions
  • Fixed @brief comment return description to “screen height”
  • Updated member variable comment from “heigth” to “height”
deepin-devicemanager/src/Tool/EDIDParser.h

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

@deepin-ci-robot
Copy link

deepin pr auto review

我来审查这段代码的变更,主要涉及函数命名、注释和变量名的修正:

1. 函数命名修正

  • parserVendor() 改为 parseVendor()
    • 这是一个合理的命名修正,使其符合驼峰命名规范,并且与类中其他函数命名风格一致(如 parseReleaseDate())。
  • 在调用处也相应更新了函数名,保持了代码一致性。

2. 注释改进

  • height() 函数的文档注释中添加了返回值说明:
    /**
     * @brief height : get screen height
     * @return screen height
     */
    • 这是一个很好的改进,使文档更加清晰明确。

3. 变量名修正

  • m_Height 的注释中修正了拼写错误:
    - int                    m_Height;                           // heigth
    + int                    m_Height;                           // height
    • 这是一个简单的拼写错误修正,提高了代码的可读性。

4. 整体评价

这些修改都是积极且必要的:

  1. 命名规范化:统一了函数命名风格
  2. 文档完善:增加了函数返回值说明
  3. 错误修正:修正了拼写错误

建议改进

虽然这些修改已经很好,但我还可以提出以下几点建议:

  1. parseVendor() 函数的文档注释中也可以添加更详细的说明,比如参数、返回值等:

    /**
     * @brief parseVendor: 从edid中获取厂商信息
     * @details 解析EDID数据中的厂商ID(08h和09h位置),并将其转换为可读的厂商名称
     */
  2. 考虑为所有成员变量添加文档注释,说明其用途和含义。

  3. 可以考虑添加错误处理机制,比如在解析EDID数据时添加有效性检查。

  4. 建议添加单元测试来验证解析功能的正确性。

总的来说,这些修改提高了代码的一致性和可读性,是积极的改进。

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

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: add-uos, 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

@add-uos
Copy link
Contributor Author

add-uos commented Sep 23, 2025

/merge

@deepin-bot deepin-bot bot merged commit d3ea819 into linuxdeepin:develop/eagle Sep 23, 2025
18 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