Skip to content
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

refactor: migrate build system from qmake to CMake #23

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

Johnson-zs
Copy link
Contributor

  • Replace .pro file with CMakeLists.txt
  • Add cmake as build dependency
  • Keep same source structure and dependencies
  • Maintain translation handling
  • Update installation rules

Log: Build with CMake

- Replace .pro file with CMakeLists.txt
- Add cmake as build dependency
- Keep same source structure and dependencies
- Maintain translation handling
- Update installation rules

Log: Build with CMake
@Johnson-zs Johnson-zs force-pushed the master branch 2 times, most recently from 78e7edb to f253138 Compare December 31, 2024 06:17
- Replace Qt5 dependencies with Qt6
- Update DTK dependencies from DTK5 to DTK6
- Switch udisks2-qt5 to udisks2-qt6
- Remove X11 specific code and use Qt6 window handling
- Update build dependencies in debian/control
- Update CMake configuration for Qt6/DTK6
- Update README with new dependencies

Log: This change modernizes the codebase to use the latest Qt6 and DTK6 frameworks.
@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 文件路径和模式

    • .reuse/dep5文件中,Files: *CMakeLists.txt的路径模式可能不正确,应该检查是否所有CMakeLists.txt文件都在项目根目录下。
  2. CMakeLists.txt

    • find_package(Qt6 COMPONENTS Core Gui Widgets Concurrent Network DBus LinguistTools REQUIRED)中,LinguistTools可能不是Qt6的必要组件,应该确认是否需要。
    • target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::GuiPrivate)中的Qt6::GuiPrivate是否必要,通常不需要链接私有模块。
    • target_compile_options(${PROJECT_NAME} PRIVATE ${PKGS_CFLAGS_OTHER})中,${PKGS_CFLAGS_OTHER}可能需要更详细的说明,以确保编译选项的正确性。
  3. main.cpp

    • qputenv("QT_QPA_PLATFORM", "dxcb");qputenv("QT_QPA_PLATFORMTHEME", "deepin");应该在创建QApplication之前设置,以确保平台主题设置生效。
    • qDBusRegisterMetaType<QPair<bool, QString>>();中的QString应该使用QString的完整命名空间,以避免潜在的命名冲突。
    • XSetTransientForHint调用应该在isWaylandfalse时才执行,以避免在Wayland环境下调用X11函数。
  4. translations/dde-device-formatter.tstranslations/dde-device-formatter_zh_CN.ts

    • 翻译文件中的<location>标签的行号可能需要更新,以反映代码的实际位置。
  5. view/mainpage.cpp

    • sizeString函数中的size.count()size.size()可以互换使用,因为它们在功能上是等价的。

总体来说,代码看起来已经迁移到了Qt6,并且大部分更改都是合理的。但是,需要确保所有依赖项和库都已正确更新,并且所有功能在迁移后仍然正常工作。

Copy link

TAG Bot

TAG: 1.5.0
EXISTED: no
DISTRIBUTION: unstable

1.5.0

Log: tag 1.5.0
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Johnson-zs, max-lvs

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Johnson-zs Johnson-zs merged commit da95489 into linuxdeepin:master Jan 2, 2025
16 of 18 checks passed
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.

3 participants