Skip to content

fix: include Qt private modules for Qt 6.11#574

Merged
wineee merged 1 commit intolinuxdeepin:masterfrom
zccrs:master
Sep 29, 2025
Merged

fix: include Qt private modules for Qt 6.11#574
wineee merged 1 commit intolinuxdeepin:masterfrom
zccrs:master

Conversation

@zccrs
Copy link
Member

@zccrs zccrs commented Sep 28, 2025

This commit explicitly includes GuiPrivate and QuickPrivate Qt modules in CMakeLists.txt for both the waylib and waylib/src/ server directories. This is necessary because Qt 6.11 and later versions no longer implicitly include these private modules. Failing to include them results in build failures due to missing headers and symbols.

Log: Fixed build issue with Qt 6.11 and later versions by explicitly including necessary private Qt modules.

Influence:

  1. Verify that the project builds successfully with Qt versions 6.11 and later.
  2. Ensure that all functionalities relying on Qt private modules (e.g., custom QML components, internal Qt API usage) continue to work as expected.
  3. Test on different platforms (Linux, Windows, macOS) where Qt is used.

fix: 为 Qt 6.11 包含 Qt 私有模块

此提交在 waylibwaylib/src/server 目录的 CMakeLists.txt 中显式 包含 GuiPrivateQuickPrivate Qt 模块。 这是必要的,因为 Qt 6.11 及更高版本不再隐式包含这些私有模块。 未能包含它们会导致由于缺少头文件和
符号而导致构建失败。

Log: 通过显式包含必要的私有 Qt 模块,修复了 Qt 6.11 及更高版本的构建
问题。

Influence:

  1. 验证项目是否可以使用 Qt 6.11 及更高版本成功构建。
  2. 确保所有依赖于 Qt 私有模块的功能(例如,自定义 QML 组件、内部 Qt API 使用)继续按预期工作。
  3. 在使用 Qt 的不同平台(Linux、Windows、macOS)上进行测试。

Summary by Sourcery

Ensure compatibility with Qt 6.11 and later by explicitly adding required private modules and updating private header includes.

Bug Fixes:

  • Add GuiPrivate and QuickPrivate modules to CMakeLists in waylib and waylib/src/server to resolve missing header and symbol errors on Qt 6.11+

Enhancements:

  • Conditionally include the appropriate QGenericUnixTheme private header in qwlrootsintegration based on Qt version

This commit explicitly includes `GuiPrivate` and `QuickPrivate` Qt
modules in `CMakeLists.txt` for both the `waylib` and `waylib/src/
server` directories. This is necessary because Qt 6.11 and later
versions no longer implicitly include these private modules. Failing
to include them results in build failures due to missing headers and
symbols.

Log: Fixed build issue with Qt 6.11 and later versions by explicitly
including necessary private Qt modules.

Influence:
1. Verify that the project builds successfully with Qt versions 6.11
and later.
2. Ensure that all functionalities relying on Qt private modules
(e.g., custom QML components, internal Qt API usage) continue to work
as expected.
3. Test on different platforms (Linux, Windows, macOS) where Qt is used.

fix: 为 Qt 6.11 包含 Qt 私有模块

此提交在 `waylib` 和 `waylib/src/server` 目录的 `CMakeLists.txt` 中显式
包含 `GuiPrivate` 和 `QuickPrivate` Qt 模块。 这是必要的,因为 Qt 6.11
及更高版本不再隐式包含这些私有模块。 未能包含它们会导致由于缺少头文件和
符号而导致构建失败。

Log: 通过显式包含必要的私有 Qt 模块,修复了 Qt 6.11 及更高版本的构建
问题。

Influence:
1. 验证项目是否可以使用 Qt 6.11 及更高版本成功构建。
2. 确保所有依赖于 Qt 私有模块的功能(例如,自定义 QML 组件、内部 Qt API
使用)继续按预期工作。
3. 在使用 Qt 的不同平台(Linux、Windows、macOS)上进行测试。
@zccrs zccrs requested a review from wineee September 28, 2025 10:18
@sourcery-ai
Copy link

sourcery-ai bot commented Sep 28, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Ensure compatibility with Qt 6.11+ by explicitly adding GuiPrivate and QuickPrivate modules in CMake configuration and updating conditional header inclusion for generic Unix theme support.

File-Level Changes

Change Details Files
Explicitly include Qt private modules in CMakeLists
  • Added GuiPrivate and QuickPrivate to QT_COMPONENTS
  • Updated find_package call to require private modules
waylib/CMakeLists.txt
waylib/src/server/CMakeLists.txt
Adjust theme header includes based on Qt version
  • Wrapped generic Unix theme include in QT_VERSION_CHECK >= 6.10 condition
  • Retained fallback to older private header for earlier versions
waylib/src/server/platformplugin/qwlrootsintegration.cpp

Possibly linked issues

  • Init repository #1: PR adds Qt private modules, fixing Waylib build for Qt 6.11+, likely resolving the XWayland crash.

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 - here's some feedback:

  • Wrap the addition of GuiPrivate and QuickPrivate in CMakeLists with a Qt version check (or bump the minimum Qt version) to avoid breakage on older Qt releases.
  • Relying on Qt private modules can be brittle—consider if any of that functionality can be migrated to supported public APIs for future compatibility.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Wrap the addition of GuiPrivate and QuickPrivate in CMakeLists with a Qt version check (or bump the minimum Qt version) to avoid breakage on older Qt releases.
- Relying on Qt private modules can be brittle—consider if any of that functionality can be migrated to supported public APIs for future compatibility.

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: wineee, zccrs

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

@wineee wineee merged commit 232cf37 into linuxdeepin:master Sep 29, 2025
10 of 12 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