Repository navigation
chore: replace Qt keywords with macros (QT_NO_KEYWORDS) - #421
18202781743 wants to merge 1 commit into
Conversation
|
Skipping CI for Draft Pull Request. |
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR prevents Qt keyword collisions by enabling QT_NO_KEYWORDS during builds and migrating affected project code from emit/signals/slots syntax to Q_EMIT/Q_SIGNALS/Q_SLOTS, while isolating vendored code from the compile-definition change. Sequence diagram for macro-based Qt signal emissionsequenceDiagram
participant Wayland as PersonalizationWaylandClient
participant Theme as PlatformTheme
Wayland->>Theme: Q_EMIT windowRadiusChanged(radius)
Wayland->>Theme: Q_EMIT iconThemeNameChanged(theme_name)
Wayland->>Theme: Q_EMIT themeNameChanged(theme)
Wayland->>Theme: Q_EMIT fontNameChanged(font_name)
Wayland->>Theme: Q_EMIT fontPointSizeChanged(pointSize)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkgui\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 4393cea435"
}
]
} |
bf59dd3 to
048c94b
Compare
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkgui\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 4393cea435"
}
]
} |
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: 无行为变更,仅关键字到宏的替换,解决第三方库命名冲突。
048c94b to
6348192
Compare
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkgui\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 4393cea435"
}
]
} |
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例本次变更无需修复,代码已正确使用 Qt 宏替代关键字。 若后续新增代码中使用信号槽,应继续遵循 QT_NO_KEYWORDS 约定, 使用 Q_EMIT、Q_SLOTS、Q_SIGNALS 而非 emit、slots、signals。本报告由 AI 代码审查工具自动生成 |
审查结论阻塞:CI 已复现 Qt5 编译失败。 全局 涉及路径如 建议:
修复后需重新跑 Qt5/Qt6 构建矩阵。 |
|
TAG Bot New tag: 6.7.53 |
|
TAG Bot New tag: 6.7.54 |
Description
Replace Qt keywords with macro equivalents to prevent naming conflicts with third-party libraries:
emit→Q_EMITsignals:→Q_SIGNALS:slots:→Q_SLOTS:Add
QT_NO_KEYWORDScompile definition in CMake to enforce macro-only usage.Notes
3rdparty/,libqt5xcbqpa-dev/,libqt6xcbqpa-dev/,qtwayland-dev/) are NOT modifieddde-qtintegrationanddde-qtplatform-pluginsuse per-targettarget_compile_definitionsinstead of globaladd_compile_definitionsto protect vendored codeset_source_files_properties(... COMPILE_FLAGS -UQT_NO_KEYWORDS)Issue: DDE-499
Summary by Sourcery
Enforce Qt keyword macros throughout the affected code to improve compatibility with third-party libraries.
Enhancements:
Build: