fix(dde-apps): support GCC 16 meta-object compilation - #1736
Conversation
Tell moc to include itemspage.h for the ItemsPage* return type of AppGroupManager::groupPages(). Without its definition, Qt probes the forward-declared type in a SFINAE context before the combined MOC translation unit defines it. GCC 16 diagnoses this with -Wsfinae-incomplete, and the project's -Werror setting turns the warning into a build failure. Q_MOC_INCLUDE keeps the ordinary header's forward declaration while making the type complete for generated metadata. Log: Fix dde-apps builds with GCC 16
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: felixonmars 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 GuideAdds a Q_MOC_INCLUDE for itemspage.h so Qt’s generated meta-object code sees ItemsPage as complete during type probing, fixing GCC 16 builds without changing the ordinary header dependency model. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto reviewAI 代码审查报告
总体评价
本次 PR 通过在 漏洞统计
漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个 四维度评分维度1: 语法逻辑 ✓ (25/25)
分析: 本次变更在 变更背景:
维度2: 代码质量 ✓ (25/25)
分析:
维度3: 代码性能 ✓ (20/20)
分析:
维度4: 代码安全 ✓ (30/30)
分析: 本次变更未引入任何安全风险:
改进建议本次变更质量优秀,无需改进。以下为可选的增强建议:
class ItemsPage;
// GCC 16 -Wsfinae-incomplete: MOC needs the full definition for ItemsPage* return type
Q_MOC_INCLUDE("itemspage.h")审查结论本次 PR 通过添加 |
Tell moc to include itemspage.h for the ItemsPage* return type of AppGroupManager::groupPages(). Without its definition, Qt probes the forward-declared type in a SFINAE context before the combined MOC translation unit defines it. GCC 16 diagnoses this with -Wsfinae-incomplete, and the project's -Werror setting turns the warning into a build failure.
Q_MOC_INCLUDE keeps the ordinary header's forward declaration while making the type complete for generated metadata.
Log: Fix dde-apps builds with GCC 16
Summary by Sourcery
Bug Fixes: