Commit Graph

531 Commits

Author SHA1 Message Date
Chen Bin e221e232fc fix: Build failed using clang
const 类成员函数下的成员变量默认会添加 const 属性,
而 QMutexLocker 的参数需要接收一个非 const 的变量,
出现编译错误。这种情况下,需要将成员变量修改为
mutable。

Log:
Change-Id: I573b3a258a837037717b9d646977886dba45c5d8
2022-09-01 11:07:49 +08:00
Wang Zichong 71bb1cd1dd fix: wrong option() usage in CMakeLists.txt
修复错误的 option() 用法

Log:
2022-09-01 02:50:10 +00:00
Ye ShanShan f1c4f76f1a chore: Modify some nonstandard writing
Change Warning log to Debug.
  Rename GlobalUID to InvalidUID avoiding to misunderstand.
  cache saved only it's setValue has been called.

Log: 移除错误的输出警告,当cache被修改后才保存
Influence: 如果没有设置值,再不会生成缓存文件
Change-Id: I1f71513e91bef3412f593281e68fea44801fe07b
2022-08-31 03:51:37 +00:00
Ye ShanShan 9bdb33a201 fix: DConfig can't load meta file
PREFIX's value is error when qmake to cmake, and it causes
dde-dconfig-daemon can't load meta file.

Log: PREFIX未赋值,导致查找配置文件路径错误
Influence: 配置中心服务异常,不能正确加载配置信息
Change-Id: Ib0850d40ff62ebf6673bd410afa3f9587a2b3413
2022-08-31 11:47:12 +08:00
myml a58c432421 fix: README link
fix 'Application Specification' link url
2022-08-31 11:16:57 +08:00
deepin-admin-bot 22a7a7c9b6 "chore: Sync by " 2022-08-30 09:11:22 +00:00
chenhongtao 552c42794e chore(package): unit test, coverage
use better optionname and use test , make test link to -lgcov , then
coverage can be caculated. And use ctest , the cmake command to run
tests

fix test-recoverage bash scipts

Log: option name changed , use ctest command, fix test-recoverage script
2022-08-30 08:14:36 +00:00
chenhongtao d0c66b03a6 feat(doc): add package for doc
build the package for doc

Log: build package of doc
2022-08-29 09:33:59 +08:00
Chen Bin 9cdc9e7741 feat: add the permission management for files
Use DCapManager class to unify privilege management on
whether to open files or not.

By registering a special file engine, the scope of action
after registration is global unless called the unregister
function manually.

By default, the application can still access some directories
and files with permissions after it is started, but when it
access files beyond the scope of these directories, it will
not get any information.

The default directory includes: Home path; Cache path; DSG path
XDG path etc.

Log:
Influence: null
Change-Id: I0fed6051addc56001b382fc34f73b046c0e4aca2
2022-08-26 11:45:17 +08:00
Ye ShanShan 066f34ede8 chore: Add zh_CN readme
add README.zh_CN.md

Log: 添加中文说明文档
Influence: none
Change-Id: Ic45a17adbfd068b3036aae83524791fc7f602b81
2022-08-26 10:13:23 +08:00
Wang Zichong a4ee7c1275 fix: missing include folder while generating documentation
添加项目转换为 CMake 后生成文档缺少的 include 目录

Log:
2022-08-25 13:30:56 +08:00
xzl 1750f9811b chore: update REUSE license header
更新开源合规内容

Log: 更新开源合规内容
2022-08-19 13:05:01 +08:00
Felix Yan 5109a018ab chore: fix a typo in dfilewatcher.cpp
Correct a typo.

Log: Fix a typo in dfilewatcher.cpp
2022-08-19 10:29:21 +08:00
ShootingStarDragons c2ab630d91 chore(win32): Add win32 files and delete pri files
Delete all pri files and add win32 files back to CMakeLists.txt

Log: add win32 file back to CMakeLists.txt
2022-08-17 06:06:02 +00:00
ck 165921354d fix(build): invalid digit "8" in octal constant
when BUILD_VERSION start with 0 was recognized as octal

Log:
Influence: debian build
Change-Id: I0d9cb1518b4250b5f50408651d8fab66f469bebb
2022-08-17 13:03:59 +08:00
deepin-bot[bot] c19f743895
chore: Sync by 8fb17418f4 (#89)
chore: Sync by 8fb17418f4
2022-08-16 09:33:47 +00:00
ShootingStarDragons db5ae947fe feat(tocmake): tocmake
Change the build system to cmake

Log: use cmake
2022-08-16 07:50:54 +00:00
deepin-bot[bot] b2de0dd2e2
chore: Sync by ab82576125 (#87)
chore: Sync by ab82576125
2022-08-16 00:14:15 +00:00
Hillwood Yang a0817dffb4 fix: link to dl
It should link to dl for some distrbutions. For example, openSUSE.
The compiling won't be success without this link.

Log:
2022-08-15 14:55:00 +08:00
deepin-bot[bot] c859224ee7
chore: Sync by (#86)
chore: Sync by
2022-08-15 03:03:51 +00:00
deepin-bot[bot] c0d423e8d1
chore: Sync by 1086c873ff (#85)
chore: Sync by 1086c873ff
2022-08-12 02:05:52 +00:00
deepin-bot[bot] 8f422c4d4f
chore: Sync by 8cd7951872 (#84)
chore: Sync by 8cd7951872
2022-08-11 08:52:07 +00:00
guoyao c6629ebb55 chore: adapt REUSE license header
开源合规

Log: 开源合规
2022-08-11 14:02:36 +08:00
zccrs 7b13e5c4b8 fix: fallback to the user directory if no a valid global config directory
In the not supported for DSG_APP_DATA environment, we can't get a valid
directory for the global config, then falied when saving data. In order
not to lose data, we can only fallback to storing it to the user
directory.

Also, allows to specify a fallback directory for DSG_APP_DATA on
compile, in order to never fallback to the user directory.

Log:
2022-08-04 14:30:03 +08:00
deepin-bot[bot] a597abb745
chore: Sync by fed570b6d7 (#77)
chore: Sync by fed570b6d7
2022-07-26 05:45:45 +00:00
deepin-bot[bot] 28215712ce
chore: Sync by (#76)
chore: Sync by
2022-07-21 10:02:26 +00:00
zccrs 9b9b96427a
fix: remove not supported syntax for README (#75)
Log:
2022-07-21 17:51:54 +08:00
deepin-bot[bot] 381fa7ca74
chore: Sync by (#73)
chore: Sync by
2022-07-19 09:10:25 +00:00
rewine 702a43dd09
feat: add NixOS for DSysInfo (#62)
Log: add NixOS for DSysInfo
2022-07-19 09:32:23 +08:00
Han Gao 6c2377c6da
feat: add Gentoo for DSysInfo (#63)
add gentoo define to DSysInfo

Signed-off-by: Han Gao <gaohan@deepin.org>
Co-authored-by: Han Gao <gaohan@deepin.org>
2022-07-18 17:18:11 +08:00
zccrs a650c2c452
Merge pull request #72 from kegechen/master
Merge develop/snipe to master
2022-07-18 16:18:14 +08:00
ck 6008c019ff feat: Merge branch 'develop/snipe'
merge develop/snipe

Log:
Influence: none
Change-Id: I0e035f79a4a84039cb1ff865fed907951e468a9b
2022-07-18 15:46:07 +08:00
wang fei 4138a26e2f feat: 加载dconfigfile时,添加value字段的检测
加载meta和override时,检测配置项是否有value字段

Log: 加载配置文件时,检测配置项是否有value字段
Influence: 配置策略
Change-Id: I9fe2f54fa76870139a6929dc46ce610de465abc8
2022-07-18 13:41:38 +08:00
ck cf02db4073 chore: update changelog
update changelog

Log: update changelog
Influence: none
Change-Id: I3f3a49bcc5d864c73f23246ba8bc612b097a092e
2022-07-12 17:46:48 +08:00
Chen Bin 40d737ebcf fix: Optimize the use of DCI tools
1. Add a comment to introduce a real example of the tool.
2. Fix possible fileName acquisition failures in export scenarios

Log:
Influence: None
Change-Id: I752d8d3548793af35b25f748d0f255a86dc32c8f
2022-07-12 15:09:47 +08:00
Ye ShanShan c313f308ea fix: AppId gets error
AppId gets error when DTK_DISABLED_FALLBACK_APPID is set.

Log: 获取AppId时fallback错误
Influence: none
Change-Id: I27007980d0c95cdfce30b40fcb27a5f64e5eac08
2022-07-12 13:25:24 +08:00
ck 4fb186d57d chore: update changelog
update changelog

Log: update changelog
Influence: none
Change-Id: I5cfdaa9ff1cc153ee061bfdd1a0edf79d991ef10
2022-07-08 15:14:10 +08:00
Gary Wang 86ae88ebe4 chore: build doxygen documentation
追加基于 doxygen 的文档构建

Log:
2022-07-04 08:57:29 +00:00
wang fei 5969c48719 feat: 加载dconfigfile时,添加value字段的检测
加载meta和override时,检测配置项是否有value字段

Log: 加载配置文件时,检测配置项是否有value字段
Influence: 配置策略
Change-Id: I9fe2f54fa76870139a6929dc46ce610de465abc8
2022-06-28 21:15:41 +08:00
justforlxz 7947860818 feat: update archlinux build
update archlinux build

Log:
2022-06-21 17:43:25 +08:00
wang fei ed31144e74 chore: 更新changelog
develop/snipe 分支更新changelog 到 5.6.0.1

Log:
Influence: changelog
Change-Id: Id1f379f729100b3fab23326bd2575dcb00a8ff56
2022-06-14 10:39:09 +08:00
wang fei 903db8a019 feat: os-version中增加对abc字段的适配
如果有abc字段,buildVersion返回加上abc字段

Log:
Task: https://pms.uniontech.com/task-view-144645.html
Influence: os-version字段
2022-06-08 18:02:31 +08:00
Ye ShanShan 1ce2bd0835 fix: DConfig'appId assertion failed
Use DConfigPrivate's appId as far as possible,
Remove invalid code, it maybe crash when applicationName is empty.

Log:
Influence: 部分使用场景可能出现applicationName为空,导致断言发生,例如全局变量
初始化DConfig时(在QCoreApplication初始化之前被调用)。

Change-Id: Ic732be96c6821aefc64622ba86e1817f238a028d
2022-06-07 15:41:48 +08:00
Ye ShanShan b4325f531e chore: dtkcore_config.h miss include some Class
`include.files+=` is behind `load(dtk_build)`, so those files don't
execute dtk_build function, it casues dtkcore_config.h don't include
`include.files` in `dtk_build` back.

Log: 
Influence: none
Change-Id: I06afe3df5c80145d7d9ff9da281571a9725366d5
2022-05-25 15:33:48 +08:00
deepin-bot[bot] 0a173d7a4e
chore: Sync by 99dfe0471c (#65)
chore: Sync by 99dfe0471c
2022-05-19 03:38:41 +00:00
ck f9db0fbb69 chore: fix build warning
Q_UNUSED(qq)

Log:
Influence: none
Change-Id: I5808eeb4a1aa844ad78c12da20b5f4f8fe54df65
2022-05-16 21:12:40 +08:00
Ye ShanShan e8d6130c31 fix: DConfig can't find resource
dde-config-daemon loads resouce from `$$PREFIX/share/dsg` when default
action, and `PREFIX`'s value is empty.
set default value for PREFIX from QT_INSTALL_PREFIX(/usr).

Log: 
Influence: 开发dtkcore,但没有指定PREFIX值,导致配置策略加载失败
Change-Id: I97573c283365aa581d5e93eb75d27259134f10af
2022-05-10 20:38:45 +08:00
Ye ShanShan a54b317ca5 fix: application crash when dconfig is invalid
Add invalid check for all DConfig's method(avoid null pointer dereference).
fallback to FileBackend when DBusBackend can't be created.

set correct environment value in unit test.

Log:
Influence: all application crash when dconfig is invalid but still
call other method expect isValid.

Change-Id: I7395f44518989cb14a09306fcfd4db380608a24e
2022-05-10 20:38:39 +08:00
Ye ShanShan 91447e5d39 fix: DSetting unit error and crash randomly
DSettingsBackend::doSetOption is executing when `DSettings` has
been destroyed, because `doSetOption` is connected in `QueuedConnection`
way, this would be ensure `backendWriteThread`'seventloop is exited
when `DSetting` destoryed.

we ensure `DSettings` is released before `SettingBackend`, so that
`SettingBackend`'s slot would be executed when `DSetting` destoryed.

we also should ensure `SettinBackend` is thread safely, because os
`DSettings` has backendWriteThread to execute doSetOption, and getOption,
is execute in main thread.

remove link of libdtkcore in qmake, because we compile it's source code
in unit test.

Log:
Influence: none
Change-Id: I35fcb8dff2145aec74255889dbd84b5a0525bffb
2022-05-10 20:37:52 +08:00
Ye ShanShan 305f97a724 fix: dconfig can't support embed complex data type
using recursion to parse QDBusArgument.

Log: 
Influence: none
Change-Id: I483721fb761eae1e735aa36fd38fe93cbd2d1529
2022-05-10 20:29:18 +08:00