Merged
Conversation
deepin-ci-robot
added a commit
to linuxdeepin/dtk6widget
that referenced
this pull request
Oct 13, 2025
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#687
Contributor
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Signed-off-by: ComixHe <heyuming@deepin.org>
deepin-ci-robot
added a commit
to linuxdeepin/dtk6widget
that referenced
this pull request
Oct 13, 2025
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#687
Contributor
deepin pr auto review我对这段CMake代码进行审查,提出以下改进意见:
改进建议:
if("${QT_VERSION_MAJOR}" STREQUAL "5")
find_package(Qt5 REQUIRED COMPONENTS X11Extras)
elseif("${QT_VERSION_MAJOR}" STREQUAL "6")
if (${Qt6Core_VERSION} VERSION_GREATER_EQUAL "6.10.0")
set(QT_NO_PRIVATE_MODULE_WARNING ON)
find_package(Qt6 REQUIRED COMPONENTS GuiPrivate WidgetsPrivate PrintSupportPrivate)
endif()
else()
message(FATAL_ERROR "Unsupported Qt Version: ${QT_VERSION_MAJOR}")
endif()建议将QT_NO_PRIVATE_MODULE_WARNING的作用域限制在if块内: if("${QT_VERSION_MAJOR}" STREQUAL "5")
find_package(Qt5 REQUIRED COMPONENTS X11Extras)
elseif("${QT_VERSION_MAJOR}" STREQUAL "6")
if (${Qt6Core_VERSION} VERSION_GREATER_EQUAL "6.10.0")
set(QT_NO_PRIVATE_MODULE_WARNING ON PARENT_SCOPE)
find_package(Qt6 REQUIRED COMPONENTS GuiPrivate WidgetsPrivate PrintSupportPrivate)
endif()
else()
message(FATAL_ERROR "Unsupported Qt Version: ${QT_VERSION_MAJOR}")
endif()
if("${QT_VERSION_MAJOR}" STREQUAL "5")
find_package(Qt5 REQUIRED COMPONENTS X11Extras)
message(STATUS "Found Qt5 version: ${Qt5Core_VERSION}")
elseif("${QT_VERSION_MAJOR}" STREQUAL "6")
if(${Qt6Core_VERSION} VERSION_LESS "6.10.0")
message(WARNING "Qt6 version ${Qt6Core_VERSION} is below recommended version 6.10.0")
endif()
set(QT_NO_PRIVATE_MODULE_WARNING ON PARENT_SCOPE)
find_package(Qt6 REQUIRED COMPONENTS GuiPrivate WidgetsPrivate PrintSupportPrivate)
message(STATUS "Found Qt6 version: ${Qt6Core_VERSION}")
else()
message(FATAL_ERROR "Unsupported Qt Version: ${QT_VERSION_MAJOR}. Only Qt5 and Qt6 are supported.")
endif()
if("${QT_VERSION_MAJOR}" STREQUAL "5")
find_package(Qt5 REQUIRED COMPONENTS X11Extras)
if(NOT Qt5_FOUND)
message(FATAL_ERROR "Failed to find required Qt5 components")
endif()
elseif("${QT_VERSION_MAJOR}" STREQUAL "6")
if(${Qt6Core_VERSION} VERSION_GREATER_EQUAL "6.10.0")
set(QT_NO_PRIVATE_MODULE_WARNING ON PARENT_SCOPE)
find_package(Qt6 REQUIRED COMPONENTS GuiPrivate WidgetsPrivate PrintSupportPrivate)
if(NOT Qt6_FOUND)
message(FATAL_ERROR "Failed to find required Qt6 components")
endif()
else()
message(WARNING "Qt6 private modules require version 6.10.0 or higher")
endif()
else()
message(FATAL_ERROR "Unsupported Qt Version: ${QT_VERSION_MAJOR}. Only Qt5 and Qt6 are supported.")
endif()这些改进将使代码更加健壮、可维护,并提供更好的错误处理和反馈。 |
18202781743
approved these changes
Oct 13, 2025
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, ComixHe 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 |
ComixHe
pushed a commit
to linuxdeepin/dtk6widget
that referenced
this pull request
Oct 13, 2025
Synchronize source files from linuxdeepin/dtkwidget. Source-pull-request: linuxdeepin/dtkwidget#687
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.
No description provided.