feat: add deepinfiledialog theme#188
Conversation
compiling deepin file dialog theme without dtk depends
93bc790 to
59f880a
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kegechen 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 |
| qt6_add_dbus_interface(DBUS_INTERFACES ${CMAKE_CURRENT_LIST_DIR}/xmls/com.deepin.filemanager.filedialogmanager.xml filedialogmanager_interface) | ||
| endif() | ||
|
|
||
| include(../filedialog/filedialog.cmake) |
There was a problem hiding this comment.
这里如果是为了源码共享,可以使用OBJECT或者INTERFACE的TARGET类型共享
| @@ -0,0 +1,69 @@ | |||
| /* | |||
| #include "dthemesettings.h" | ||
| #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) | ||
| #include "../3rdparty/qdbustrayicon_p.h" | ||
| #include "../../3rdparty/qdbustrayicon_p.h" |
There was a problem hiding this comment.
避免在源码中使用相对目录,使用target_include_directories
| # SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | ||
| # | ||
| # SPDX-License-Identifier: LGPL-3.0-or-later | ||
|
|
||
| if(QT_VERSION_MAJOR EQUAL 5) | ||
| qt5_add_dbus_interface(DBUS_INTERFACES ${CMAKE_CURRENT_LIST_DIR}/xmls/com.deepin.filemanager.filedialog.xml filedialog_interface) | ||
| qt5_add_dbus_interface(DBUS_INTERFACES ${CMAKE_CURRENT_LIST_DIR}/xmls/com.deepin.filemanager.filedialogmanager.xml filedialogmanager_interface) | ||
| else() | ||
| qt6_add_dbus_interface(DBUS_INTERFACES ${CMAKE_CURRENT_LIST_DIR}/xmls/com.deepin.filemanager.filedialog.xml filedialog_interface) | ||
| qt6_add_dbus_interface(DBUS_INTERFACES ${CMAKE_CURRENT_LIST_DIR}/xmls/com.deepin.filemanager.filedialogmanager.xml filedialogmanager_interface) | ||
| endif() | ||
|
|
||
| set(DFM_DLG_HEADERS ${CMAKE_CURRENT_LIST_DIR}/qdeepinfiledialoghelper.h) | ||
| set(DFM_DLG_SOURCES ${CMAKE_CURRENT_LIST_DIR}/qdeepinfiledialoghelper.cpp) |
There was a problem hiding this comment.
target 就把俩plugin关联在一起了。 现在这种方式可以只编译一个。没有dtk的依赖。换成target是不是需要带入另外一个theme的编译依赖呢
There was a problem hiding this comment.
不需要,是这个文件夹里面的内容单独做一个target,两个theme都依赖这一个target。
There was a problem hiding this comment.
仅仅是使用target的方式共享需要共享的源码,本质上和你这里的cmake一样,但是以target的方式,会更加灵活,不需要依赖于目录。
| #include <DPlatformHandle> | ||
| DGUI_USE_NAMESPACE |
There was a problem hiding this comment.
就是想要纯粹的文管的filedialog服务,不想引入dtk依赖, 比如一个安装在opt目录下的自带qt 某一个版本的应用(很多,如网易云音乐,有道词典等)需要用我们的文管对话框,这个时候就可以简单的编译deepin-file-dialog的theme来实现
There was a problem hiding this comment.
但是我记得qdeepinfiledialog本身有dtkwidget的依赖吧
There was a problem hiding this comment.
没有。仅仅有的dtkgui的都移除了。
风格插件有dtkwidget的依赖
There was a problem hiding this comment.
我们这整个项目都有dtkwidget的依赖,如果想要单独编出这个插件,还要做一些修改
|
试着跑一下覆盖率脚本,看一下是否能够正常获取信息 |
|
TAG Bot New tag: 5.6.25 |
|
TAG Bot New tag: 5.6.26 |
|
TAG Bot New tag: 5.6.27 |
|
TAG Bot New tag: 5.6.28 |
|
TAG Bot New tag: 5.6.29 |
|
TAG Bot New tag: 5.6.30 |
|
TAG Bot New tag: 5.6.31 |
|
TAG Bot New tag: 5.6.32 |
|
TAG Bot New tag: 5.6.34 |
|
TAG Bot New tag: 5.7.1 |
|
TAG Bot New tag: 5.7.2 |
|
TAG Bot New tag: 5.7.3 |
|
TAG Bot New tag: 5.7.4 |
|
TAG Bot New tag: 5.7.5 |
|
TAG Bot New tag: 5.7.6 |
|
TAG Bot New tag: 5.7.7 |
|
TAG Bot New tag: 5.7.8 |
|
TAG Bot New tag: 5.7.9 |
|
TAG Bot New tag: 5.7.10 |
|
TAG Bot New tag: 5.7.11 |
|
TAG Bot New tag: 5.7.12 |
|
TAG Bot New tag: 5.7.13 |
|
TAG Bot New tag: 5.7.14 |
|
TAG Bot New tag: 5.7.15 |
|
TAG Bot New tag: 5.7.16 |
|
TAG Bot New tag: 5.7.17 |
|
TAG Bot New tag: 5.7.18 |
|
TAG Bot New tag: 5.7.19 |
compiling deepin file dialog theme without dtk depends
可以方便的编译出非系统 Qt 版本的theme, 方便使用 deepin 风格 filedialog。
当然,还是需要修改一下顶层 CMakeList.txt 去掉其他插件,去掉其中 dtk 的依赖