Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: adapts to Qt #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

feat: adapts to Qt #132

wants to merge 1 commit into from

Conversation

myml
Copy link
Member

@myml myml commented Dec 4, 2024

适配Qt6

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: myml

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

@myml myml force-pushed the qt6 branch 7 times, most recently from 79065bb to 2a52c61 Compare December 5, 2024 05:45
@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. CMakeLists.txt文件中,将find_package命令从Qt5更改为Qt${QT_VERSION_MAJOR},这是一个好的做法,因为它提高了代码的灵活性和可配置性。但是,需要确保在所有相关的地方都进行了相应的更改,以避免潜在的编译错误。

  2. CMakeLists.txt文件中,execute_process命令的路径硬编码为/usr/lib/qt${QT_VERSION_MAJOR}/bin/lrelease。建议使用环境变量或配置文件来设置这个路径,以便于在不同环境中使用。

  3. src/api/api.cpp文件中,API::waitSignal函数中,对于Content-Type的检查,增加了对content-type的检查,这是一个好的做法,可以增加代码的健壮性。

  4. src/dbusservice/com.deepin.deepinid.Client.xmlsrc/dbusservice/com.deepin.deepinid.xml文件中,移除了name属性,这是一个好的做法,可以简化XML文件的结构。

  5. src/main/daemon.cpp文件中,移除了QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);这一行,这是一个好的做法,因为高DPI缩放现在默认是启用的。

  6. src/maincomponentplugin/CMakeLists.txt文件中,移除了find_package(Qt5QuickCompiler REQUIRED)qtquick_compiler_add_resources命令,这是因为Qt6不再支持Qt5QuickCompiler,而是使用qt_add_resources

  7. src/maincomponentplugin/apiproxy.cpp文件中,APIProxy::waitFuture函数中,增加了对异常的捕获和处理,这是一个好的做法,可以提供更详细的错误信息。

  8. src/maincomponentplugin/article/Article.qml文件中,移除了QtGraphicalEffects的导入,这是因为Qt6不再支持QtGraphicalEffects,而是使用QtQuick.Shapes

  9. src/maincomponentplugin/feedback/Submit.qml文件中,移除了QtGraphicalEffects的导入,这是因为Qt6不再支持QtGraphicalEffects,而是使用QtQuick.Shapes

  10. src/maincomponentplugin/index/Card1.qml文件中,移除了QtGraphicalEffects的导入,这是因为Qt6不再支持QtGraphicalEffects,而是使用QtQuick.Shapes

  11. src/maincomponentplugin/index/Card2.qml文件中,移除了QtGraphicalEffects的导入,这是因为Qt6不再支持QtGraphicalEffects,而是使用QtQuick.Shapes

  12. src/maincomponentplugin/index/Card3.qml文件中,移除了QtGraphicalEffects的导入,这是因为Qt6不再支持QtGraphicalEffects,而是使用QtQuick.Shapes

  13. src/maincomponentplugin/index/Index.qml文件中,移除了QtGraphicalEffects的导入,这是因为Qt6不再支持QtGraphicalEffects,而是使用QtQuick.Shapes

  14. src/maincomponentplugin/main.qml文件中,移除了org.deepin.dtk.impl的导入,这是因为Qt6不再支持org.deepin.dtk.impl,而是使用org.deepin.dtk

  15. src/maincomponentplugin/widgets/Avatar.qml文件中,移除了QtGraphicalEffects的导入,这是因为Qt6不再支持QtGraphicalEffects,而是使用QtQuick.Shapes

  16. src/preloadplugin/CMakeLists.txt文件中,移除了find_package(Qt5QuickCompiler REQUIRED)qtquick_compiler_add_resources命令,这是因为Qt6不再支持Qt5QuickCompiler,而是使用qt_add_resources

总的来说,这些更改都是为了适应Qt6的更新,并且提高了代码的健壮性和可维护性。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants