fix: compatibility with Qt 6.10#373
Merged
Merged
Conversation
Credits to Antonio Rojas from Arch Linux.
There was a problem hiding this comment.
Sorry @felixonmars, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
deepin pr auto review这段代码是一个CMakeLists.txt文件,主要处理Qt和Deepin工具包(DFLTK/DTK)的依赖关系。我来分析一下这段代码并提出改进意见: 语法逻辑
代码质量
代码性能
代码安全
改进建议
改进后的代码可能如下: # 查找Qt基本组件
find_package(Qt${QT_VERSION_MAJOR} ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Core Gui WaylandClient)
# Qt 6.10+需要额外的私有API支持某些Wayland集成功能
if(Qt${QT_VERSION_MAJOR}_VERSION VERSION_GREATER_EQUAL "6.10.0")
message(STATUS "Using Qt 6.10+ private APIs for Wayland integration")
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS GuiPrivate WaylandClientPrivate REQUIRED)
if(NOT Qt${QT_VERSION_MAJOR}_GuiPrivate_FOUND OR NOT Qt${QT_VERSION_MAJOR}_WaylandClientPrivate_FOUND)
message(FATAL_ERROR "Qt 6.10+ requires GuiPrivate and WaylandClientPrivate components")
endif()
endif()
# 查找Deepin工具包
find_package(Dtk${DTK_VERSION_MAJOR} REQUIRED COMPONENTS Gui Widget)
# 查找ECM模块
find_package(ECM REQUIRED MO_MODULE)这样的改进提高了代码的可维护性和可读性,同时增强了错误处理能力。 |
BLumia
approved these changes
Oct 15, 2025
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia, 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 |
Member
|
/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Credits to Antonio Rojas from Arch Linux.