Commit Graph

364 Commits

Author SHA1 Message Date
deepin-admin-bot 23c069ddb9 chore: Sync by 559e91167d
sync by github workflow

Log: none
Influence: none
2023-07-10 06:12:34 +00:00
wangfei bf0a4a7bef feat: add license feature
add license feature

Log: add license feature
2023-05-11 13:39:07 +08:00
deepin-admin-bot b7b859508d chore: Sync by 2e5e092ba3
sync by github workflow

Log: none
Influence: none
2023-05-10 02:23:53 +00:00
deepin-admin-bot cfd8219696 chore: Sync by 2dd22560f7
sync by github workflow

Log: none
Influence: none
2023-04-14 08:41:31 +00:00
deepin-admin-bot a6741c39fa chore: Sync by c5d10d3aeb
sync by github workflow

Log: none
Influence: none
2023-04-14 08:31:57 +00:00
deepin-admin-bot 3f67f9ce7d chore: Sync by d45f73b2d0
sync by github workflow

Log: none
Influence: none
2022-12-28 07:55:21 +00:00
deepin-admin-bot 8f0ea1d10b chore: Sync by 3de30af6dc
sync by github workflow

Log: none
Influence: none
2022-11-24 08:45:35 +00:00
ck 31f01ba34f chore: update changelog
update changelog

Log: update changelog
Influence: none
Change-Id: Ic6864bb5c396db262673ae232b364f19914541b7
2022-11-24 13:50:12 +08:00
wang fei 51bfccfda2 chore: 完善cpu信息获取接口(cpuModelName)
分别按以下顺序取其值,取到就返回:
1. 首先匹配sw,hw-klv里的特殊字段;
2. 然后取model name字段;
3. 最后通过lscpu命令获取;

Log: 修改cpu信息获取接口
Task: https://pms.uniontech.com/task-view-218217.html
Influence: cpuModelName接口
Change-Id: I6ba1a66f1d898725ebcb9a59791f6d466149a3a3
2022-11-22 08:57:40 +00:00
deepin-admin-bot 4a75e87df8 chore: Sync by 6aa579e31c
sync by github workflow

Log: none
Influence: none
2022-11-18 02:00:26 +00:00
deepin-admin-bot bd4e3a7a92 chore: Sync by 50ad27fb2a
sync by github workflow

Log: none
Influence: none
2022-11-16 03:44:15 +00:00
deepin-admin-bot 6fa340336f chore: Sync by d15debb9d3
sync by github workflow

Log: none
Influence: none
2022-11-11 06:54:21 +00:00
deepin-admin-bot 8e4ba2ecf0 chore: Sync by 6fbf8e00b9
sync by github workflow

Log: none
Influence: none
2022-10-14 05:24:48 +00:00
Ye ShanShan d031357a68 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 13:02:07 +08:00
deepin-bot[bot] bf30a50edb
chore: Sync by (#74)
chore: Sync by
2022-07-19 09:10:28 +00:00
wang fei 4138a26e2f feat: 加载dconfigfile时,添加value字段的检测
加载meta和override时,检测配置项是否有value字段

Log: 加载配置文件时,检测配置项是否有value字段
Influence: 配置策略
Change-Id: I9fe2f54fa76870139a6929dc46ce610de465abc8
2022-07-18 13:41:38 +08:00
Gary Wang 86ae88ebe4 chore: build doxygen documentation
追加基于 doxygen 的文档构建

Log:
2022-07-04 08:57:29 +00:00
justforlxz 7947860818 feat: update archlinux build
update archlinux build

Log:
2022-06-21 17:43:25 +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 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
Ye ShanShan e43ebd081c 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-04-29 08:12:09 +00:00
Ye ShanShan 9c9c027209 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-04-29 08:03:57 +00:00
deepin-bot[bot] bd31ad47e0
File Sync from linuxdeepin/.github (#58)
chore: Sync by b5a441b9bb
2022-04-21 07:01:49 +00:00
deepin-bot[bot] 695d83dc91
chore: Sync by 41155231b0 (#57)
chore: Sync by 41155231b0
2022-04-18 09:42:40 +00:00
xyf 7a24e234d5 chore: Update README.md
将README.md中的Qt版本更新

Log: 更新README.md
2022-04-15 11:37:34 +08:00
Ye ShanShan 5b9329246e 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`'s eventloop is exited
when `DSetting` destoryed.

we ensure `DSettings` is released before `SettingBackend`, so that
`SettingBackend`'s slot would not 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
2022-03-23 11:17:45 +08:00
Ye ShanShan b6d3462745 fix: dconfig can't support embed complex data type
using recursion to parse QDBusArgument.

Log:
Influence: none
2022-03-23 11:16:43 +08:00
deepin-bot[bot] 6cb60700f1
File Sync from linuxdeepin/.github (#48)
chore: Sync by d459ab5b73
2022-03-15 08:13:46 +00:00
Ye ShanShan e594322141 fix: modify loading order of application meta path
for application meta path loads order change from
/usr/share/dsg/apps/${appid}/confgis to
/usr/share/dsg/configs/${appid} or /usr/share/dsg/configs;
replace DStandardPaths::paths to DStandardPaths::path.
modify saved path。

Log:
Influence: all application's configuration would not be loaded
unless updating dtkcommon and it's application package.

Change-Id: Ia8212618fd2d4a5ecf67f05aad32a92d934ea01d
2022-03-14 10:17:56 +08:00
ck 72632597fd chore: remove assert in ensureOsVersion
use if condition instead of assert
setStatus No_ERROR when loadfile success

Log:
Influence: none
Change-Id: Id13c9c418054890e41e51dae9367261844fe9ed6
2022-03-14 09:23:58 +08:00
zccrs 732ec1f338 refactor: add DStandardPaths::paths(DSG type) interface
The DSG::DataDir is a path list like the xdg data dirs, change the env "DSG_DATA_DIR"
to "DSG_DATA_DIRS".

Influence: dconfig 相关的改动,改变了获取配置文件路径的逻辑,与此相关的产品功能不应
该出现任何变化。

Log:
Change-Id: I5f12e42aee607ed749aa63f503c62e352c07b2a6
(cherry picked from commit 33bfc9b25f)
2022-03-10 20:47:27 +08:00
Ye ShanShan 0960bea4e2 feat: Add interface for Dconfig
add reset function;
add Dconfig construct containing appId, to keep compatible,we use
a static function to avoid ambiguous, construct function calls
no appid's. it is useful to access other application's configure
timely in DBusBackend.

Log:
Influence: user can access other application's configure and
reset value for the key.

Change-Id: Id707a96ba1216b406b5c6f724ba5d715cfb053db
2022-03-09 08:46:10 +08:00
ck 6867a279be chore: 修改单元测试生成目录
修改单元测试相关文件的目录结构

Log:
Influence: 单元测试目录结构
Change-Id: Ife2dabc8763fd6689c7b5c5fadbc40152217e116
2022-03-04 16:45:51 +08:00
Ye ShanShan 438f3adce5 feat: add data type check for config
Check value's type of incoming is compatible,
it copies a value and converts to meta type, it promises
that setValue function is not changing meta type.

Log:
Influence: calling DConfig's setValue maybe fail because of type
incompatible.

Change-Id: I35bef57261a3130ebcb4aeeff83261737ad51197
2022-03-02 20:14:28 +08:00
Ye ShanShan a3503969de fix: Can't access QStringList type data for DConfig
it's occur in DBusBackend, and we directly to get meta value that not
exist cache.
normal value type is automatic casted from QDBusVariant to QVariant,
and QVariantList type need to cast explicitly, it's value type is
QDBusArgument.
because our data store backend is using QJsonValue to resolve, so
we only case QVariantList and QVariantMap, it maybe error in lastly.

Log: 
Influence: DConfig is not access stringlist data type.
Change-Id: I81dbc2ea6b7933154d26ddba70def95ef79240d6
2022-03-01 17:21:41 +08:00
Ye ShanShan 847c721c87 fix: unit error
inotify_init1 failed in DFileSystemWatcher, it reports Too many
open files, and now we avoid to CHECK temporarily in ut.

Log: 
Influence: none
Change-Id: I42d508b1ad63dfb4dda8328a41bcbfc530082e97
2022-03-01 16:55:52 +08:00
ck 74f86b0e3c chore: 主动拉起未启动的 dconfig 服务
如果服务是 Activatable 状态那么直接调用可以启动服务
之前的逻辑是dbus服务必须是启动状态,不会自动拉起来,
可能会出现没有权限写cache

Log: 主动拉起dconfig服务
Influence: dconfig--save--permission
Change-Id: I32eb4606854f568b8754bf765802453dfdb8b15a
2022-01-26 12:23:23 +08:00
Chen Bin 7e813b8a90 docs: fix doc generate error
Fix the problem of document generation errors caused by
some symbols and commands.

Log:
Influence: dtkcore docs
Change-Id: I081c12a3bc98c89925e27aa7c2e1aeb0e228c255
2022-01-20 12:35:52 +08:00
ck 11c0eb49ad fix(build): can not find QGSettings
archlinux build failed, include path may have changed

Log:
Influence: none
Change-Id: I75d7aba1fb96a5a48fb819faf087ff1a0c7d9a0c
2021-12-24 09:54:32 +08:00
ck 78e7fa0d8f feat: osversion中OEM标识兼容
根据需求识别os-version中的OEM标识,放置出现非数字时其它未解析。

Task: https://pms.uniontech.com/zentao/task-view-95660.html
Log:
Influence: oem镜像
Change-Id: I4d2e5f71f683131553053928bc7f53115126c73c
2021-12-21 16:50:49 +08:00
yuanqiliang 4804211a53 fix: 修复dtk单例模板缺陷
析构函数设置为虚函数、返回引用

Log:

Influence: 所有用到dtkcore单例模板的地方

Change-Id: I0d1dec61679ff9d86547e6895aafdaf2fcf69115
2021-12-17 16:24:41 +08:00
Ye ShanShan cb7c91dfd5 fix: change directory of cache for dconfig
change globalcache direcotry
from '/deepin/appdata' to '/var/dsg/appdata'.
it saves failed when user has no home directory.

Bug: https://pms.uniontech.com/zentao/bug-view-105077.html
Log:
Influence: It effects all application used dconfig.

Change-Id: If7a0e67c762f58701bf58a228e84e8c2525a897f
2021-12-08 11:52:50 +08:00
zorowk 90e010a7ba fix: ut link error in dtk.
the member definition need to be separate in some build environment.

Log:
Influence: build error.
Signed-off-by: zorowk <pengwenhao@uniontech.com>
Change-Id: Idd982f0e0a17efa50e170c4590c83ea75abaa031
2021-12-01 10:12:58 +08:00
Wang Fei cc017f242d feat: DSettings适配兼容DConfig
增加DSettingsDConfigbackend类,
DSetting可以使用DConfig方式配置

Log: 使DSettings适配兼容DConfig
Influence: DSettings使用DConfig
Change-Id: I1e8485d4c087063536d17f5658a22babd74f31f4
2021-11-26 16:16:53 +08:00
ck c9c3680dfa chore: not check dtkcore2 and dtkcore5
防止重复加载这里去掉dtkcore2的加载,部分应用(deepin-system-monitor)
103x上有加载libdtkcore2,此处过滤掉

Bug: https://pms.uniontech.com/zentao/bug-view-103218.html
Log:
Influence: dtkcore2 和 dtkcore5 可同时加载
Change-Id: Ia110a2b726a905c5dc08536f0af36cceb84fed33
2021-11-16 17:54:06 +08:00
ck d1082f01a1 chore: warning only in debug mode
仅仅在debug时打印警告日志

Log:
Influence: log
Change-Id: I45e3b708f60719be020e0ea56dd487569be6710f
2021-11-09 17:34:33 +08:00
AlexOne 0d37b8a057 chore: 取消dasync的部分单元测试
取消dasync导致编译阻塞的单元测试

Influence: dasync的单元测试

Log:
Change-Id: Id20924d1079ccbf9cdda39e545a48ff2da526a24
2021-11-09 16:36:57 +08:00
Ye ShanShan 01561862c1 fix: 配置策略global配置项的cache保存路径错误
`DSG_APP_DATA`环境变量没有配置,导致正确保存目录获取失败,
global配置项的缓存文件会保存在运行目录下,若没权限,则保存失败。

Log: 
Influence: 应用配置策略的global配置项缓存路径出错
Change-Id: I02f3b406720590623424b669ee94de186afd7ad7
2021-11-01 13:57:35 +08:00
Ye ShanShan 09ffc01216 fix: 单元测试报错
部分接口在有的编译环境(可能没有配置文件)下单元测试失败,改成仅仅打印信息。

Log:
Influence: 单元测试
Change-Id: I4ebcab3fac92611072b4a7b7cf96d2fc4b3627a8
2021-10-30 15:27:22 +08:00