Commit Graph

44 Commits

Author SHA1 Message Date
wangfei 82e9562493 chore: Adapt to Qt 6.6.1
replace the obsolete interface

Log: Adapt to Qt 6.6.1
2024-03-06 11:50:54 +08:00
YeShanShan 0ba6eb1b3d feat: Add UT for DWaterMarkWidget
Add UT.
2023-09-07 12:12:10 +08:00
xzl 65308b9f3c fix: remove not working test case
Log:
2023-09-05 13:03:57 +08:00
ck f3d1a4423b feat: DFontSizeManager tweak
- add T11 (default 8 px)
- T5 17px ==> 16px

Issue: https://github.com/linuxdeepin/dtk/issues/116
2023-09-05 10:56:41 +08:00
xzl 72c59d8292 chore: add test for dwatermarkhelper
Log:
2023-08-18 15:37:01 +08:00
xzl 0312b95efa feat: add ut_dpalettehelper
Log:
2023-08-18 11:24:06 +08:00
YeShanShan 06f65568da feat: Add UT for DComboBox
Add UT.
2023-07-31 11:36:14 +08:00
xzl 5fc7371d91 feat: add some UT
Log:
2023-07-21 14:14:06 +08:00
xzl 28fe13924b fix: remove ut to support DTK6.0
Log: 移除了部分DTK6.0不支持的ut,以便通过编译,后续需要补充
2023-07-07 16:20:45 +08:00
heyuming 5a8a34a6c6 fix: fix compile error under qt6
Log: 修复Qt6下的编译错误
2023-06-21 17:01:10 +08:00
heyuming e19d7fbe7a fix: unit test error under qt5
Log: 修复qt5下单元测试的错误
2023-06-21 15:47:24 +08:00
wangyixue 5a11d970b1 fix: compile error of unit test
ut_dstyleditemdelegate.cpp does not using namespace Dtk::Gui; Add
this to it.

Log: fix compile error of unit test
2023-06-20 16:44:36 +08:00
heyuming 2382ebaba2 fix: DApplication casting error
Log: 修复DApplication的转换错误
2023-06-14 10:09:43 +08:00
renbin cbd8237ed9 chore: DPrintPreviewDialog add update setting interface.
Add interface updateDialogSettingInfo, apps can update print dialog
settings at construction time.
Add docs and UT, fix a bug that may cause a memory leak.

Log: DPrintPreviewDialog add update setting interface.
Influence: Add update setting interface.
2023-03-10 09:27:36 +00:00
ck 0386852043 feat: 自定义工具栏
1. 显示自定义工具栏;
2. 工具栏上调整控件位置;
3. 工具栏上添加和移除控件;
4. 恢复默认工具栏控件;
5. 工具栏生效。

Log: 添加自定义工具栏功能
Influence: none

Change-Id: Icb1d12d4c8881ace309e9b5cd5508bbca965c5fc
2023-01-17 16:47:22 +08:00
wang fei 217cfc5514 feat: 增加特性展示功能
1. 增加特性对话框类接口;
2. dapplication增加特性对话框相关接口;
3. 重新布局关于对话框;

Log: 新增特性介绍功能
Task: https://pms.uniontech.com/task-view-227391.html
Influence: 特性介绍,关于介绍
Change-Id: Ie6244bd313bb385846f4c5c066108b65f5afcb4f
2023-01-13 02:01:37 +00:00
renbin 30225aa55c feat: Add DImageViewer crop image function.
Add DImageViewer crop image function, DGraphicsCropItem class.
Add crop image unit test cases, update dox file comments.

Log: Add DImageViewer crop image function.
2022-12-08 14:08:41 +08:00
renbin b96acedda2 feat: Implements DImageViewer rotate, scale and gesture.
Implements the DImageViewer interface, including rotate, scale, gesture.
Add unit test cases and interface comment.

Log: Implements DImageViewer rotate, scale and gesture.
2022-12-02 05:43:40 +00:00
renbin a880020d62 feat: Implements DImageViewer set image and clear.
Implements the DImageViewer interface, including set image and clear.
And implements the DGraphicsitem classes, add unit test cases, update comment.

Log: Implements DImageViewer set image and clear.
2022-12-02 05:43:40 +00:00
Ye ShanShan 584fffef2d fix: UT error
we remove DStandardItem::clone due to incompatible in V23,
item->clone() call QStandardItem's function actually, so it
isn't a DStandardItem, but the clone's intention need to be test.
  it doesn't need to cherry-pick to master.

Log: 单元测试失败
Bug: https://pms.uniontech.com/bug-view-156901.html
Influence: 无
Change-Id: Ibac6bc721104bb0bc2f16c3a63a12fbc20e88f22
2022-10-10 09:51:43 +08:00
chenhongtao f80f48076e feat(cmake): to cmake
from qmake to cmake

Log: tocmake
2022-08-19 17:18:33 +08:00
xzl 8d8912b04f chore: adapt REUSE license header
修改为开源合规

Log: 修改项目合规
2022-08-11 05:02:57 +00:00
Ye ShanShan 431f6730b8 fix: crashed when DListView drag item with Action
DStandardItem's `setActionList` can't be used with drag because of
Type doesn't support metatype's save and load.
  and DStandardItem doesn't release it's Action when destruction,
we use sharedpointer to manager action's life.
  Add clone override function to support that action can be access
after draged, and it need to setItemPrototype by model.

Log: 含有Action项的DListView拖动时程序崩溃
Influence: none
Change-Id: Idc489b94f4cf95850fe00a9ac8231fed80913a79
2022-07-29 00:34:15 +00:00
Ye ShanShan 08073c4ed4 chore: DFlowLayout's ut error
ut error

Log: 
Influence: none
Change-Id: I4b3ff97e9588ff7678f74218c21f440270893042
2022-07-19 10:56:30 +08:00
ck e0e0f17c2f fix: ut memory leaks
ut 内存泄露问题修复

Log:
Influence: ut
Change-Id: Ifd93a54bb7c7cc050b92ade880f4adc307b70266
2021-11-22 14:55:54 +08:00
ck 50604361cf chore: 单元测试在crp上mips架构打包失败
错误信息如下:
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
make[2]: *** [Makefile:352: check] Illegal instruction

Log: 
Influence: 单元测试在crp上mips架构打包失败
Change-Id: I4f1a08f04596c856829db593aec4a0691100e486
2021-11-05 15:07:29 +08:00
Wang Penga e5bebed8d4 feat: 添加 DPasswordEdit 的复制剪切控制接口
添加copy、cut的接口以打开或关闭lineedit的复制剪切功能。
默认passwordedit不禁用复制剪切,需要应用自行调用。

Log:
Task: https://pms.uniontech.com/zentao/task-view-86148.html
Change-Id: I88512e8bb584d018e7a79f8a94e7807d8061cc9a
2021-10-12 12:28:52 +08:00
Ye ShanShan 00d1254980 fix: 修改ut_dmpriscontrol偶发失败的问题
DMPRISControl会监控music服务,当music应用运行时,dbus服务启动,
isWorking为true。

Log: 
Change-Id: I52e41eaa38b0b9dec4b6daeb0be7209dd1a9efa2
(cherry picked from commit 2f27b29e6eb8532ec8070eb53677a040dac33111)
2021-09-14 13:39:44 +08:00
wangfei 5359e3800c fix: 根据编译警告修改代码,去除warning警告
1.未使用变量加上Q_UNUSED宏;
2.增加一条返回控制流,去除返回类型不匹配警告;
3.调整初始化列表顺序,保持和变量声明顺序一致;
4.增加override关键字;

Log: 修改相关代码,去除编译警告
Change-Id: I7f48d3f04dadf59d2963fabf406143bb331ec927
2021-09-06 16:03:15 +08:00
wangfei 354a11136e chore: 补充dclipeffectwidget、dipv4lineedit等widget单元测试
补充dclipeffectwidget、dipv4lineedit、dprogressbar
dsearchcombobox、dspinner、dstyleditemdelegate、
textedit和waterprogress单元测试,提高覆盖率。

Log:
Change-Id: Ib2a73c33d3b9866fc9ef87858fb4f07d1023bbff
(cherry picked from commit 50ae968ba3)
2021-09-03 13:38:33 +08:00
Ye ShanShan 7efd5d2f03 fix: 修改内存泄露问题
修改DAnchors和单元测试DListView的内存泄露问题。

Log: 
Change-Id: Ia1fde9a55fd37c2df080ea8e142ab6d1127c6628
(cherry picked from commit 95eb7a4218f43dd5c11cbaace4e1e30e3c52b2b5)
2021-08-26 10:20:22 +08:00
Ye ShanShan a1c10c2e07 chore: 添加单元测试
新增widgets简单接口的单元测试,以增加覆盖率
DToolButton单元测试适配maintain/5.4分支
去掉test.pro中链接libdtkwidget,因为已经以源码形式嵌入到test中,
否则make check时,运行会加载libdtkwidget.so,报Shadow 错误。
剩余未添加到接口类在testcases/widget.pri文件里以`#`注释来提示,之后继续添加。

Log: 
Change-Id: I0821b57b67f4636c3179e89a2f74ff2cbb60b588
(cherry picked from commit 3413572383da384df27be9d68a27ceb2d5604b20)
(cherry picked from commit eb952dc08f)
2021-08-26 09:50:33 +08:00
Wang Penga 294315b71d chore: add unit test
添加:
    DSlider
    DTipLabel
    DTitleBar
    DPushButton
    DWindowMaxButton
    DWindowMinButton
    DWindowCloseButton
    DWindowOptionButton
    DWindowQuitFullButton
    DArrowLineExpand
    DArrowLineDrawer
    DPageIndicator
    DIpv4LineEdit
    DShadowLine
    DTextEdit
    DSpinner

Log: 添加单元测试
Change-Id: Ibcec3471bffee9e9455e08543e082919c02265dc
(cherry picked from commit 3131d9900e)
2021-08-02 13:08:06 +08:00
Wang Penga dc038432be feat: Add unit tests
为以下模块添加单元测试:
    DBoxWidget
    DBlurEffectWidget
    DIconButton
    DToolButton
    DProgressBar
    DWaterProgress
    DAnchors
    DMainWindow
    DFloatingMessage
    DSwitchButton
    DWarningButton
    DSimpleListView
    DKeySequenceEdit

Log: 为部分组件添加单元测试
Change-Id: Ic2ed6be7e54101e856f286aec3a4c549e47aaac7
2021-07-26 11:06:20 +08:00
ck 592925072d fix: 禁用打印预览的单元测试
打印预览ut 慢且容易出现崩溃,暂时禁用

Log:
Change-Id: I00eacfb40e5ecd6877d4ddeb3cfb22d33322aaa3
(cherry picked from commit 6069ca60fa)
2021-05-17 17:02:24 +08:00
Chen Bin 0697e9d673 chore: 单元测试文件增加copyright
补上单元测试文件遗漏的copyright。修改错误的copyright信息,
并添加部分文件遗漏的copyright

Log:
Change-Id: Ie64f70f4a1267190cae0b828b58d8a539f3c43b0
(cherry picked from commit 07a5558082047f9e7c5005ecf27c58fb027b8c96)
2021-05-08 09:55:52 +08:00
Chen Bin b169d1276e fix: 打印预览修复切换水印类型后字体类型切换的问题
仅处理初始化时字体选择逻辑,因此每次切换水印类型都会
切换字体到系统默认字体。
在处理时做初始化判断,仅初始化时选择默认字体,初始化
完成后字体类型保留不变。

Log: 打印预览水印切换类型文字字体类型保留上一次操作
Bug: https://pms.uniontech.com/zentao/bug-view-70095.html
Change-Id: I01ed505c4e78edc3ca3d0595c28cb70bd4afc9c3
(cherry picked from commit e690c1e300)
2021-04-08 16:51:16 +08:00
niezixuan 9e15bbc5a8 feat: 重新编写打印预览单元测试
为 dprintpreviewdialog.cpp 添加单元测试。编译报错修复

Log: 添加打印预览单元测试
Change-Id: I2d3b5a7fbbd8553c99cfa8481920561d5eea9fa7
(cherry picked from commit 91a54430e4)
2021-04-08 11:09:02 +08:00
Chen Bin 47a5b92dff fix: 修复打印预览打开直接进入deepin-picker界面
deepin-picker高版本下创建dbus接口会直接进去deepin-picker的
界面。因此选择用到取色器功能是才创建dbus接口。

Log: 仅用到取色器时才创建dbus接口
Bug: https://pms.uniontech.com/zentao/bug-view-68135.html
Change-Id: Ic4231d1fdc52e77bd45cd7ee2efee55fec51e7fd
(cherry picked from commit d1e60ef728)
2021-04-07 09:28:56 +08:00
Chen Bin 91ccecb0a8 fix: 修复打印预览出现的内存泄露
删除未指定父类的控件和未使用的变量,添加部分没有指定的
内存释放函数。
cups动态库有QLibrary加载,且内存中仅会加载一次,供所
有应用打印预览使用,因此无需释放加载完的动态内存。

Log: 减少打印预览的内存泄露
Change-Id: I920735155f5ced13a6ce65a377957eddc5fd1ec3
(cherry picked from commit 0c18ac67cb)
2021-03-15 14:52:29 +08:00
niezixuan c358d5348e fix: 修复可能会导致单元测试概率性崩溃的问题
可能的原因是,当操作lineEdit后,没有取消focus,导致TearDown的时候,会触发editingFinished信号,因而调用槽函数,访问已经释放的内存

Log: 修复可能造成概率性崩溃的原因
Change-Id: Ie6033a19a1f83408b01fdd552bbbd9883a984606
(cherry picked from commit 2c0c88a8c6)
2021-03-15 14:13:12 +08:00
niezixuan 3dd7f781f2 feat: 为打印预览 dprintpreviewdialog 文件添加单元测试,并修复可能导致崩溃的问题
为 dprintpreviewdialog.cpp 添加单元测试,修复可能会导致崩溃的问题

Log: 添加打印预览单元测试
Change-Id: Iaa7f06c8555d93f2c89c14f9d22fef16baa1bfed
(cherry picked from commit 2d199f60c3)
2021-03-15 10:34:17 +08:00
Chen Bin bdb008f375 feat: 更新打印预览widget部分单元测试
增加部分之前单元测试覆盖不到的地方,提高单元测试
覆盖率到80%

Log: 提高打印预览项目单元测试覆盖率
Change-Id: Ie44d1c8d57f37eba7cfd66c46627c0c1dd7a2ade
2021-03-09 16:43:27 +08:00
Chen Bin 8af3f10513 feat: 调整dtkwidget单元测试目录结构
1. 调整tests项目下的目录结构,将整个源码文件添加进此项目中。
2. 调整部分文件依赖,以便通过编译。

Log: 调整tests目录结构
Change-Id: I2d99f04c5154f804979180c2e0d4095d64023e65
2021-03-09 16:41:25 +08:00