build: request Qt CorePrivate/WidgetsPrivate components in application-tray#477
build: request Qt CorePrivate/WidgetsPrivate components in application-tray#477svan71 wants to merge 1 commit into
Conversation
…n-tray
application-tray links against Qt6::CorePrivate and Qt6::WidgetsPrivate but
only requests the public Core, Gui, Widgets and DBus components. Those
imported targets only exist when the matching *Private components are
requested, so configuring fails on Qt 6.11:
CMake Error at plugins/application-tray/CMakeLists.txt:70 (target_link_libraries):
Target "application-tray" links to: Qt6::CorePrivate
but the target was not found.
Reproduced on a pristine checkout with no other changes.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: svan71 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 |
|
Hi @svan71. Thanks for your PR. 😃 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR fixes a CMake configuration issue for the application-tray plugin by explicitly requesting the Qt CorePrivate and WidgetsPrivate components that are already linked, ensuring Qt 6.11+ builds configure successfully without affecting runtime behavior. Flow diagram for updated CMake Qt component discoveryflowchart TD
CMakeConfig["CMake configure for application-tray"] --> FindQt["find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets DBus CorePrivate WidgetsPrivate)"]
FindQt --> ImportTargets["Qt6 imported targets available (Core, Widgets, CorePrivate, WidgetsPrivate)"]
ImportTargets --> LinkTray["target_link_libraries(application-tray PRIVATE Qt6::CorePrivate Qt6::WidgetsPrivate)"]
LinkTray --> Success["Configure and build succeed on Qt 6.11+"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Hi @svan71. 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. DetailsInstructions 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. |
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA. |
plugins/application-tray/CMakeLists.txtlinks againstQt6::CorePrivateandQt6::WidgetsPrivate:but only requests the public components:
Those imported targets are only defined when the corresponding
*Privatecomponents are requested. On Qt 6.11.1 this fails at generate time:Reproduced on a pristine checkout of
master@b3d4784(2.0.36) with no other changes, and on2.0.35.Fix
Testing
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Releasefails at generate time with the error above.cmake --build build --target trayplugin-loader).Note
Presumably latent on the Qt version Deepin 25 ships (6.8.0), where these targets may be pulled in transitively. Surfaced on Qt 6.11.1 (Arch Linux).
Summary by Sourcery
Ensure the application-tray plugin correctly finds and links Qt CorePrivate and WidgetsPrivate components.
Bug Fixes:
Build: