-
Notifications
You must be signed in to change notification settings - Fork 53
fix: (cmake) Correctly set QT_VERSION_MAJOR and find Qt6 private modules #287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Synchronize source files from linuxdeepin/qt5integration. Source-pull-request: linuxdeepin/qt5integration#287
|
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 Once the patch is verified, the new status will be reflected by the 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. |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/qt5integration\"",
"line_number": 15,
"rule": "S35",
"reason": "Url link | cc21178aa0"
}
]
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请求修改的是下面那个问题。上面那个QT_VERSION_MAJOR未定义的情况希望能详细描述下场景(因为理论上不应该发生这个情况,如果发生了则可能是有别的什么问题)。
Synchronize source files from linuxdeepin/qt5integration. Source-pull-request: linuxdeepin/qt5integration#287
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/qt5integration\"",
"line_number": 15,
"rule": "S35",
"reason": "Url link | cc21178aa0"
}
]
} |
Synchronize source files from linuxdeepin/qt5integration. Source-pull-request: linuxdeepin/qt5integration#287
|
Note
详情{
"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.
Synchronize source files from linuxdeepin/qt5integration. Source-pull-request: linuxdeepin/qt5integration#287
|
[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 |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/qt5integration\"",
"line_number": 15,
"rule": "S35",
"reason": "Url link | cc21178aa0"
}
]
} |
Synchronize source files from linuxdeepin/qt5integration. Source-pull-request: linuxdeepin/qt5integration#287
The previous CMake logic used
find_package(QT NAMES Qt6 ...)followed byif(Qt6_VERSION VERSION_GREATER_EQUAL 6.10)to conditionally find private modules, butQt6_VERSIONis 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:
QT_VERSION_MAJORandQT_VERSION_MINORbased on the public Qt6/Qt5 version variables, preserving existing version checks in the project.find_package(Qt6 CONFIG REQUIRED COMPONENTS CorePrivate GuiPrivate WidgetsPrivate)when Qt6 >= 6.10.This ensures private modules are correctly linked when available and prevents undefined reference errors.