Skip to content

Conversation

@justforlxz
Copy link
Member

@justforlxz justforlxz commented Jul 3, 2025

  • fix: missing Qt5::Gui
  • fix: cannot build on Archlinux

Summary by Sourcery

Update build configuration and fix missing dependencies to restore compatibility and modernize requirements

Bug Fixes:

  • Add Qt5::Gui to find_package and link libraries in dde-dconfig
  • Include QCommandLineParser and QDir headers in dde-dconfig-daemon main to fix build failures

Build:

  • Raise CMake minimum required version to 3.7 across all subprojects
  • Set C++ standard to 17 in the root CMakeLists

justforlxz and others added 2 commits December 29, 2022 16:24
add Qt5::Gui to COMMON_LIBS

Log:
change cmake min required version to 3.7
change c++ standard to 17 for google-test

Log:
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: justforlxz

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

Details 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

@sourcery-ai
Copy link

sourcery-ai bot commented Jul 3, 2025

Reviewer's Guide

This PR updates CMake configurations to require CMake 3.7 across all subprojects, adds the missing Qt5::Gui dependency, bumps the C++ standard to 17, and includes new headers in the dde-dconfig-daemon to resolve build issues (notably on Arch Linux).

Class diagram for new includes in dde-dconfig-daemon main.cpp

classDiagram
    class main_cpp {
        +QCoreApplication
        +QDebug
        +DLog
        +QCommandLineParser
        +QDir
        +dconfigserver.h
    }
Loading

File-Level Changes

Change Details Files
Bump CMake minimum version to 3.7
  • Updated CMAKE_MINIMUM_REQUIRED from 2.6 to 3.7 in multiple CMakeLists
dconfig-center/dde-dconfig/CMakeLists.txt
dconfig-center/CMakeLists.txt
dconfig-center/dde-dconfig-daemon/CMakeLists.txt
dconfig-center/dde-dconfig-editor/CMakeLists.txt
dconfig-center/example/CMakeLists.txt
dconfig-center/tests/CMakeLists.txt
Add Qt5::Gui dependency
  • Included Gui in the find_package Qt5 components
  • Added Qt5::Gui to the COMMON_LIBS list
dconfig-center/dde-dconfig/CMakeLists.txt
Increase C++ standard to C++17
  • Changed CMAKE_CXX_STANDARD from 14 to 17
dconfig-center/CMakeLists.txt
Include new headers in daemon main.cpp
  • Added QCommandLineParser include
  • Added QDir include
dconfig-center/dde-dconfig-daemon/main.cpp

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @justforlxz - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. CMakeLists.txt 文件更新

    • 所有 CMakeLists.txt 文件中的 CMAKE_MINIMUM_REQUIRED(VERSION 2.6) 更新为 CMAKE_MINIMUM_REQUIRED(VERSION 3.7)。这是一个合理的升级,因为更高的版本通常提供更多的功能和改进。但是,需要确保所有依赖的库和工具都支持 CMake 3.7。
  2. C++ 标准更新

    • dconfig-center 项目中的 C++ 标准从 C++14 更新到 C++17。这是一个合理的升级,因为 C++17 引入了许多新的特性和改进。但是,需要确保代码库中的所有代码都兼容 C++17。
  3. Qt5 组件更新

    • dde-dconfigdde-dconfig-daemon 项目中,Qt5::DBus 组件被添加到 find_package 调用中。这是一个好的做法,因为它确保了项目能够正确地找到和使用 Qt5 的 DBus 组件。
  4. 新增头文件

    • dde-dconfig-daemonmain.cpp 文件中新增了 QCommandLineParserQDir 头文件。需要确认这些新增的头文件是否真的在代码中被使用,以避免不必要的依赖。
  5. Qt5::Gui 添加

    • dde-dconfig 项目中,Qt5::Gui 被添加到 COMMON_LIBS 中。这是一个合理的做法,因为 dde-dconfig 可能需要使用到 Qt 的 GUI 功能。
  6. CMakeLists.txt 文件中的版本号

    • dde-dconfig-editor 项目中,DVERSION 被定义为 1.0.0。需要确认这个版本号是否正确,并且是否与项目的实际版本相匹配。
  7. 缺少对 CMake 3.7 的支持说明

    • 在更新 CMake 版本后,没有添加任何注释或文档来解释为什么需要升级到 CMake 3.7。建议在 CMakeLists.txt 文件中添加相应的注释,以便其他开发者理解这一变更的原因。
  8. 缺少对 C++17 的支持说明

    • 在更新 C++ 标准后,没有添加任何注释或文档来解释为什么需要升级到 C++17。建议在 CMakeLists.txt 文件中添加相应的注释,以便其他开发者理解这一变更的原因。

总体来说,这些更改是合理的,但需要确保所有依赖的库和工具都支持这些更新,并且代码库中的所有代码都兼容这些更新。同时,添加适当的注释和文档可以帮助其他开发者更好地理解这些变更。

@justforlxz justforlxz closed this Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants