Skip to content

Conversation

@hillwoodroc
Copy link
Contributor

The previous CMake logic used find_package(QT NAMES Qt6 ...) followed by if(Qt6_VERSION VERSION_GREATER_EQUAL 6.10) to conditionally find private modules, but Qt6_VERSION is not set by this call. As a result, Qt6 private modules (CorePrivate, GuiPrivate, WidgetsPrivate) were never found, causing link errors on targets depending on them.

This patch updates the logic to:

  • Set QT_VERSION_MAJOR and QT_VERSION_MINOR based on the public Qt6/Qt5 version variables, preserving existing version checks in the project.
  • Conditionally find Qt6 private modules using find_package(Qt6 CONFIG REQUIRED COMPONENTS CorePrivate GuiPrivate WidgetsPrivate) when Qt6 >= 6.10.
  • Maintain compatibility with Qt5 builds.

This ensures private modules are correctly linked when available and prevents undefined reference errors.

deepin-ci-robot added a commit to linuxdeepin/qt6integration that referenced this pull request Oct 21, 2025
Synchronize source files from linuxdeepin/qt5integration.

Source-pull-request: linuxdeepin/qt5integration#287
@deepin-ci-robot
Copy link
Contributor

Hi @hillwoodroc. Thanks for your PR.

I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@github-actions
Copy link
Contributor

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "CMakeLists.txt": [
        {
            "line": "  HOMEPAGE_URL \"https://github.com/linuxdeepin/qt5integration\"",
            "line_number": 15,
            "rule": "S35",
            "reason": "Url link | cc21178aa0"
        }
    ]
}

Copy link
Member

@BLumia BLumia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请求修改的是下面那个问题。上面那个QT_VERSION_MAJOR未定义的情况希望能详细描述下场景(因为理论上不应该发生这个情况,如果发生了则可能是有别的什么问题)。

deepin-ci-robot added a commit to linuxdeepin/qt6integration that referenced this pull request Oct 23, 2025
Synchronize source files from linuxdeepin/qt5integration.

Source-pull-request: linuxdeepin/qt5integration#287
@github-actions
Copy link
Contributor

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "CMakeLists.txt": [
        {
            "line": "  HOMEPAGE_URL \"https://github.com/linuxdeepin/qt5integration\"",
            "line_number": 15,
            "rule": "S35",
            "reason": "Url link | cc21178aa0"
        }
    ]
}

deepin-ci-robot added a commit to linuxdeepin/qt6integration that referenced this pull request Oct 27, 2025
Synchronize source files from linuxdeepin/qt5integration.

Source-pull-request: linuxdeepin/qt5integration#287
@github-actions
Copy link
Contributor

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "CMakeLists.txt": [
        {
            "line": "  HOMEPAGE_URL \"https://github.com/linuxdeepin/qt5integration\"",
            "line_number": 15,
            "rule": "S35",
            "reason": "Url link | cc21178aa0"
        }
    ]
}

The condition used `Qt6_VERSION`, which is not defined by `find_package(QT ...)`.
Replace it with the correct variable `QT_VERSION` to ensure the version check
works properly with Qt 6.10 and later.
deepin-ci-robot added a commit to linuxdeepin/qt6integration that referenced this pull request Oct 27, 2025
Synchronize source files from linuxdeepin/qt5integration.

Source-pull-request: linuxdeepin/qt5integration#287
@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, hillwoodroc

The full list of commands accepted by this bot can be found here.

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

@github-actions
Copy link
Contributor

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "CMakeLists.txt": [
        {
            "line": "  HOMEPAGE_URL \"https://github.com/linuxdeepin/qt5integration\"",
            "line_number": 15,
            "rule": "S35",
            "reason": "Url link | cc21178aa0"
        }
    ]
}

@BLumia BLumia merged commit d7ada9a into linuxdeepin:master Oct 27, 2025
18 of 21 checks passed
BLumia pushed a commit to linuxdeepin/qt6integration that referenced this pull request Oct 27, 2025
Synchronize source files from linuxdeepin/qt5integration.

Source-pull-request: linuxdeepin/qt5integration#287
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants