Skip to content

chore: replace Qt keywords with macros (QT_NO_KEYWORDS) - #105

Open
18202781743 wants to merge 1 commit into
masterfrom
agent/developer/dea1631977fa
Open

18202781743 wants to merge 1 commit into
masterfrom
agent/developer/dea1631977fa

Conversation

@18202781743

@18202781743 18202781743 commented Oct 30, 2026 •

Copy link
Copy Markdown

Replace emit/signals:/slots: with Q_EMIT/Q_SIGNALS:/Q_SLOTS: to avoid naming conflicts with pure C++ or third-party libraries.

Also adds QT_NO_KEYWORDS compile definition in CMakeLists.txt and fixes SPDX copyright year ranges.

Related issue: DDE-499

Summary by Sourcery

Migrate the project to Qt’s macro-based signal and slot syntax and enable QT_NO_KEYWORDS for improved compatibility with standard C++ and third-party libraries.

Enhancements:

  • Replace Qt signal and slot keywords with Q_EMIT, Q_SIGNALS, and Q_SLOTS throughout the codebase to support QT_NO_KEYWORDS and avoid naming conflicts.

Build:

  • Enable the QT_NO_KEYWORDS compile definition across the main project and plugin builds.

Tests:

  • Update affected tests to use the Qt keyword-compatible signal emission macro.

Chores:

  • Refresh SPDX copyright year ranges across modified source and header files.

@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743

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

@18202781743
18202781743 force-pushed the agent/developer/dea1631977fa branch 2 times, most recently from 488ce70 to 0284050 Compare November 2, 2026 05:41
@18202781743
18202781743 marked this pull request as ready for review November 2, 2026 05:41
@sourcery-ai

sourcery-ai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Sorry @18202781743, your pull request is larger than the review limit of 150,000 diff characters

deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request Nov 2, 2026
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#105
@18202781743
18202781743 force-pushed the agent/developer/dea1631977fa branch from 0284050 to 8b62b70 Compare November 2, 2026 06:59
deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request Nov 2, 2026
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#105
deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request Nov 2, 2026
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#105
@18202781743
18202781743 force-pushed the agent/developer/dea1631977fa branch from fdf7f7e to aad9af6 Compare November 2, 2026 07:44
deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request Nov 2, 2026
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#105
@18202781743
18202781743 force-pushed the agent/developer/dea1631977fa branch from aad9af6 to 77c55e3 Compare November 2, 2026 09:41
deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request Nov 2, 2026
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#105
Replace emit/signals:/slots: with Q_EMIT/Q_SIGNALS:/Q_SLOTS: to avoid
naming conflicts with pure C++ or third-party libraries. Add QT_NO_KEYWORDS
compile definition after project() in CMakeLists.txt.

将 emit/signals:/slots: 替换为 Q_EMIT/Q_SIGNALS:/Q_SLOTS:,
避免纯 C++ 或第三方库引入时的命名冲突。在 CMakeLists.txt 中
添加 QT_NO_KEYWORDS 编译定义。

Log: 替换Qt关键字为宏形式并添加QT_NO_KEYWORDS编译定义
Influence: 无行为变更,仅关键字到宏的替换,解决第三方库命名冲突。
@18202781743
18202781743 force-pushed the agent/developer/dea1631977fa branch from 77c55e3 to 1b07116 Compare November 2, 2026 10:44
deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request Nov 2, 2026
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#105
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 100 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 本次提交将 Qt 关键字(emit/signals/slots)替换为宏形式(Q_EMIT/Q_SIGNALS/Q_SLOTS),并在 CMakeLists.txt 中添加 QT_NO_KEYWORDS 编译定义,是标准的 Qt 最佳实践重构。所有替换均正确无误,无逻辑变更,无安全风险,版权年份更新合理。

🔍 详细分析

1. 语法逻辑 ✅

评价: 语法正确,逻辑清晰 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


2. 代码质量 ✅

评价: 代码结构清晰,注释完整 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


3. 代码性能 ✅

评价: 性能良好,资源使用合理 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


4. 代码安全 🔒

评价: 存在0个安全漏洞 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: []


💡 改进建议代码示例


本报告由 AI 代码审查工具自动生成

@18202781743
18202781743 requested review from BLumia and mhduiy November 3, 2026 02:15
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.

2 participants