YeShanShan
271edf81b1
feat: Add isDefaultValue for DConfig
...
Add isDefaultValue function.
Issue: https://github.com/linuxdeepin/dtk/issues/3
2023-09-15 16:55:13 +08:00
YeShanShan
9d338ebeb5
fix: Can't clear cache when reset for DConfig in FileBackend
...
Clear cache.
2023-09-15 16:55:13 +08:00
ck
58244dd554
chore: console with color at tty
...
revert to c5ca3ba0
2023-08-18 13:47:08 +08:00
ck
c6484af1c2
chore: support Qt 6.4 build
...
headers tweak
2023-08-17 09:48:30 +08:00
ck
b9cf2a22be
chore: tweak CMakeLists
...
- use DtkBuildHelper functions
- tests/CMakeLists.txt tweak
2023-08-16 09:28:02 +08:00
ck
4c50be9afb
chore: ut linked dtkcore instead of source code
...
- use linked dtkcore target instead of source code
- test-revoverage.sh tweak
- setup_code_coverage && check_and_add_definitions functions(will move to dtkcommon)
2023-08-15 15:17:32 +08:00
ck
5e2b16c51f
fix: FileAppender log level not set
...
log level not set, spdlog default is Info
fix FileAppender ut failed
2023-08-14 17:22:26 +08:00
ck
24a29a0f9f
feat: use spdlog reimplement dlog
...
reimplement dlog
use `DLogHelper` instead of `CuteMessageLogger` `LoggerTimingHelper`
keep CuteMessage symbol for compatibility (fix undefined symbol: _ZNK3Dtk4Core17CuteMessageLogger5writeEPKcz)
2023-08-14 09:00:43 +08:00
ck
efc5668128
chore: dsysinfo tweak
...
- add test file path support
- fix ensureDeepinInfo may break loop too ealy
2023-07-19 15:02:09 +08:00
ck
43be742963
fix: internalPropSet nerver emit propertyChanged
...
signal should emit when reply *Not* contain an error msg
2023-07-18 17:12:33 +08:00
ck
588ada8684
feat: add systembus send support
...
DDBusSender::system()
2023-07-17 09:00:10 +08:00
chenhongtao
d4a9334349
chore(dcapmanager): RuntimeTime -> RuntimeDir
...
Log:
2023-07-07 06:57:17 +00:00
chenhongtao
8610d26c9f
fix: typo in xdg
...
Log:
2023-07-07 05:39:26 +00:00
chenhongtao
7967167ad3
fix: updateProp cannot convert to property type
...
if there is a property, try to convert to the type
Log:
2023-07-06 05:11:00 +00:00
ck
868218a1db
refactor!: deprecate some interfaces in dtk6
...
- dconfig_meta_files/dconfig_override_files remove in dtk6
- not install deprecated class headers
- remove deprecated interfaces in dtk6
2023-07-05 10:19:56 +08:00
ck
8827126b47
chore: remove ddbusinterface property cache
...
有的服务属性改变时不会发送 ProperiesChanged 导致属性变化后再次
获取属性时还是旧的 value ,因为缓存不会更新
2023-06-19 16:34:37 +08:00
heyuming
beb491e781
fix: move Qt CorePrivate to target private link
...
Log:
2023-06-19 10:05:01 +08:00
heyuming
2df5ca70dd
feat: add DThreadUtils class
...
Log: 添加DThreadUtils类
2023-06-16 14:15:25 +08:00
ck
f5fd6cf9a8
feat: support dtk6core build
...
cmake -DDVERSION=6.0.0 to build libdtk6core
install qdbusxml2cpp-fix to DCore/bin to avoid conficts
do not build doc when build dtk6
remove Core5Compat depends
DVERSION ==> DTK_VERSION
tools install to CMAKE_INSTALL_LIBEXECDIR
2023-06-16 08:32:50 +08:00
renbin
d74c7fbc52
fix: fix DTextEncoding warnings.
...
Delete never be ececuted code, use new-style cast,
avoid "disable expansion of recursive macro".
Log: fix DTextEncoding warnings.
2023-06-09 13:30:56 +00:00
renbin
475671232e
fix: DTextEncoding ut failed in Qt6.
...
1. Fix DTextEncoding muti-byte encoding calculation error.
2. Replace QTextCodec with QStringConverter in Qt6 env.
3. Add convertTextEncodinigEx() interface.
Log: Fix DTextEncoding ut failed in Qt6.
2023-06-08 17:26:52 +08:00
ck
5d1ae206f9
fix(build): build faild on Qt6
...
QVariant constructor && QDBusMetaType::demarshall
2023-06-06 10:15:46 +08:00
chenhongtao
4630b5c621
fix(ut): failed ut
...
Log: fix failed ut
2023-06-02 10:17:31 +08:00
YeShanShan
1a16c38d77
fix: DConfig's `subpathIsValid` produces error
...
It's correctly even if subpath is not exist, so we can't use
`QDir::canonicalPath` to adjust subpath.
Add ut.
2023-06-01 13:45:52 +08:00
chenhongtao
db8fd1bf7b
fix(dccinterface): fix cannot get the right type
...
Log: fix cannot get the right type
2023-05-31 07:46:03 +00:00
YeShanShan
50ff1e70fb
feat: DConfig exports metadir's implementation
...
Export metadir's search path for users.
Issue: https://github.com/linuxdeepin/dtk/issues/10
2023-05-24 10:38:33 +08:00
YeShanShan
a6969026dd
feat: DConfig add check for subpath
...
Avoid to access unprivileged directory by DConfig's subpath.
Issue: https://github.com/linuxdeepin/dde-app-services/issues/54
2023-05-23 17:46:06 +08:00
wangyixue
0f879bdebb
fix: calling delay in DDBusSender
...
When creating QAbstractInterface, Qt will try to invoke instrospection
into the DBus path, this is sometimes costing when instrospection
is not ready for that path. Change the implementation of DDBusSender.
Don't use QDBusInterface. Instead, create a QDBusMessage and invoke it
directly. This is sensible because DDBusSender is just a wrapper like
QDBusInterface, it shouldn't rely on QDBusInterface.
Issue: https://github.com/linuxdeepin/developer-center/issues/4415
Log: fix calling delay in DDBusSender
2023-05-23 10:27:27 +08:00
YeShanShan
f7a7a3b1fc
feat: DConfig add check for no existed item when override
...
We shouldn't add the item when override file has no existed
item in meta items.
2023-05-17 13:38:09 +08:00
YeShanShan
60c61be94a
chore: Revert deleted function for DVtableHook
...
The functions are used in template, and they aren't inline,
so we can't delete them in this version, but we can remove
their implementation.
It caused in fb4845350a
2023-05-15 09:10:32 +08:00
chenhongtao
386087df58
chore: back cache of caculate memoryInstalled
...
Log: bring back cache for caculate memoryInstalled
2023-05-10 16:08:21 +08:00
wangfei
5b650fb843
feat: add license infomation feature
...
1. add dlicenseinfo interface
2. add dlicenseinfo unit test
3. add dlicenseinfo document
Log: add license information feature
2023-05-09 16:30:56 +08:00
chenhongtao
c5ca3ba029
fix: color is in file if is redirect
...
Log: use isatty func to check if is stderr is redirected
2023-05-05 02:58:17 +00:00
heyuming
d073f8c81e
fix: incorrect DSecureString destructor
...
Log: 修复DSecureString的析构函数
2023-04-28 09:24:14 +08:00
heyuming
fb4845350a
fix: sync with qt5platform-plugins
...
623ce74a8c
Log: 同步qt5platform-plugins
2023-04-27 10:18:07 +08:00
guoyao
4c6390cd5b
chore: remove build warning
...
as title
Log:
2023-04-27 08:54:19 +08:00
chenhongtao
356801bfaf
feat: add color to ConsoleAppender
...
Log: add color to ConsoleAppender
2023-04-26 13:21:49 +08:00
YeShanShan
0cabf46e81
fix: No log file
...
The log file will not be generated even though we call
`registerFileAppender` when `$HOME` is empty, it is the default for
Qt, But we can fallback it to get the home directory from its user.
e.g. for `dde-dconfig-daemon, it may be called by a specific
user with a home directory but `$HOME` unset.
2023-04-26 13:11:37 +08:00
YeShanShan
2378742c88
fix: AppId fetch error when fallback to applicationName
...
We shouldn't store appId fallback to applicationName.
2023-04-20 13:43:56 +08:00
ck
5347bebaff
chore: support XDG_SESSION_DESKTOP set to DDE
...
环境变量设置为 DDE 时,当然是 DDE 了
2023-04-10 18:09:47 +08:00
Ye ShanShan
3ace2e4fa7
feat: Support cache to be relocated for DConfigFile
...
Add setCachePrefix function to support that cache can be relocated
by caller, It's default value doesn't changed, and we can refer to
`配置文件规范` in https://github.com/linuxdeepin/deepin-specifications .
Permissions is left to the caller.
For DConfig's FileBackend, we use it's default value.
Issue: https://github.com/linuxdeepin/dtkcore/issues/271
2023-03-20 14:19:20 +08:00
heyuming
46dae03834
feat: append to all appenders when category is not registered
...
之前当程序未将category和appender关联起来时, log无法正常输出,
现添加一种fallback方式来支持此行为
相关issue:https://github.com/linuxdeepin/dtkcore/issues/292
Log: 当没有注册对应的category时输出log信息到所有的appender
2023-03-15 17:46:20 +08:00
heyuming
64731fb083
fix!: remove DCapFSFileEngine
...
由于在开启Relocatable的Qt上,
注册DCapFileEngine会影响到Qt内部代码产生错误的结果,
并且并没有很好的办法判断某个文件是否应该由DCapFileEngine作为后端,
所以移除
Log: 移除DCapFSFileEngine
2023-03-10 16:57:38 +08:00
heyuming
6954ff2ba9
fix: Fix incomplete copy of Vtable
...
1. 修复了因不完整拷贝引起的rtti信息丢失的问题
2. 对于虚表结尾判断增加了新的限制条件
3. 增加了调整虚表指针的方法,
后续可以考虑取消对于函数指针和对象指针类型一致的限制
Log: 修复不完整的虚表拷贝
2023-03-06 13:09:36 +08:00
Ye ShanShan
a100a7637e
refactor: Removing the same code for homePath
...
Using homePath(uid) to implement homePath().
2023-02-24 11:30:17 +08:00
heyuming
04cc067b8d
fix: Temporarily fix the dead loop generated by QDebug destructor when compiling with the relocatable feature of qt
...
Log: 暂时修复由于qt使用relocatable特性编译时QDebug析构时产生的死循环
2023-02-23 18:21:11 +08:00
heyuming
b6f349c8ec
fix: fix compile error when using qt6
...
Log: 修复使用qt6时的编译错误
2023-02-22 15:43:09 +08:00
yeshanshan
072dd9562d
feat: Add generic configuration support for DConfig ( #236 )
...
All application can use same configuration by generic
configuration.
Loading cache file can fallback to noappid's directory when not
using appid or not find cache file.
one application writes configuration.
```c++
auto config = DConfig::createGeneric(FileName);
config->setValue("common-configuration", true);
```
other applications read configration can give appid or not to
get the configuration.
Set empty string for DBus caller when using acquireManager.
Log: 配置策略支持应用无关配置,缓存精准匹配到meta是否使用appid
Influence: none
Change-Id: I78b331f9c455617d5dfea6df087b1f4828390974
2023-02-16 09:41:28 +00:00
yeshanshan
56809c72e5
fix: Compiling error in qt5 ( #270 )
...
Adapt to qt5
Log: none
Influence: none
Change-Id: I71280483e12d137a7b8710c8617cea6303ad4909
2023-02-16 08:08:54 +00:00
ck
edbc7c0eda
chore: log file function and line by default
...
add QT_MESSAGELOGCONTEXT dfinetions by default
log file function line by default
Log: log
Change-Id: I119eb2ffe4ac3d372fba874b99b9fc75131c0d6e
2023-02-16 14:21:10 +08:00
ck
558a852e38
chore: private link QtCorePrivate
...
cmake target private link Qt::CorePrivate
Log: cmake link
2023-02-16 11:11:52 +08:00
heyuming
d1605f7da2
feat: support Qt6
...
Log: 支持Qt6
2023-02-14 13:22:03 +08:00
yeshanshan
9e23a65552
fix: missing BUILD_WITH_SYSTEMD macro ( #258 )
...
Define macro to be used in cpp.
Log: none
Influence: none
Change-Id: I40f743e74b5a5c5eb8e94e4ba099747d3d88523d
2023-02-07 09:50:08 +00:00
xzl
098e3975f0
fix: Removing strong dependencies on systemd
...
去除对systemd的强依赖
Log:
2023-02-06 15:24:41 +08:00
Ye ShanShan
33de26ff1c
fix: Losing dconfig info when compiling and packaging
...
Add adjust for linux when compile.
Add `D_DSG_APP_DATA_FALLBACK` macro when packaging.
see the commit: 7b13e5c4b8
Log: none
Influence: none
Change-Id: Ie047dbd2d8158ed5242dfb5bcc7fa4e02ee1d925
2023-02-03 08:52:09 +00:00
Ye ShanShan
494b185eee
fix: Cleaning path about dconfigfile
...
cleanPath for file path.
cacheChanged is reset when saved avoid to resaving.
Log: none
Influence: none
Change-Id: I5bf6c2165ad19a66ad7684d696bef97c3432f0fa
2023-02-03 08:51:09 +00:00
xzl
94e0e3fd86
feat: add journal appenders
...
support log to journal
Log:
2023-01-31 17:44:55 +08:00
ck
4cfda53c9c
feat: add chinese2pinyin polyphonic support
...
1. update dpinyin.dict with polyphonic support
2. add pinyin and firstLetters function
3. add ch2py tools to convert Chinese to Pinyin
dict data reference https://github.com/mozillazg/pinyin-data (zdict.txt MIT)
Bug: https://pms.uniontech.com/bug-view-143063.html,https://pms.uniontech.com/bug-view-182013.html
Log: Chinese2Pinyin polyphonic support
Influence: Chinese to Pinyin
Change-Id: I5fd05c071f68908949e2b1abbbd11feed302abd4
2023-01-18 17:36:05 +08:00
xzl
245dbab5b7
feat: update file watcher manager
...
添加列出当前监控的文件列表的接口
添加删除全部监控的接口
Log:
2023-01-16 16:03:37 +08:00
bluesky
bb2b4428df
docs: update dfilesystemwatcher docs
...
更新dfilesystemwatcher的文档
Log: update docs
Task: deepin-community/coding-quarter#26
2023-01-16 13:19:09 +08:00
xzl
24cc0da201
docs: update docs
...
更新文件监控方面文档
Log:
2023-01-15 01:33:52 -06:00
heyuming
b3053920c7
fix: remove doubleLoadCheck
...
不需要此检查了
Log: 移除doubleLoadCheck
2022-12-24 17:19:57 +08:00
wangyixue
5158c45dd0
chore: modify include directories policy
...
Change policy from PUBLIC to PRIVATE.
Log: modify include directories policy
2022-12-23 02:09:54 -06:00
wangyixue
adc8a2e764
chore: remove dependency search
...
Remove pkg_check_modules for gsettings-qt
Log: remove dependency search
2022-12-23 14:51:02 +08:00
rewine
deb1c8e37d
feat: optimization logic for other distribution
...
优化对其他发行版的支持
Log: 优化非deepin/uos发行版支持
2022-12-23 05:38:23 +00:00
wangyixue
950aef580b
feat: add support for cmake target link
...
Now users can simple find_package, and then target_link_libraries with
Dtk::Core. There is no need to invoke target_include_directories,
target_link_libraries will do all things for you.
Log: add cmake target link support
2022-12-23 10:22:12 +08:00
renbin
64bbdc979b
feat: Add DTextEncoding class.
...
1. Add DTextEncoding class, provides encoding detection and encoding conversion.
2. Add interface unit test cases, example and comment document.
3. DTextEncoding dynamically loads libuchardet.so and libicuuc.so to support
extended text encodings.
Log: Add DTextEncoding class.
Influence: Add build dependencies libuchardet-dev and libicu-dev.
2022-12-20 01:25:33 +00:00
jiangqii
5f15083361
chore: use mountpoint to find root device
...
from https://github.com/linuxdeepin/dtkcore/pull/40
QStorageInfo::root().device()扫描的是/etc/mtab里的内容,
但是有的根节点就只会显示/dev/root,这个会导致在控制中心
显示磁盘容量的时候不能显示,故现更改获取根挂载点的方式,
在lsblk的方法上增加。
Log:
Influence: systemDiskSize
Change-Id: I95a4955ae6d862df6c66b3d09f42b92285967ca9
2022-12-13 17:55:02 +08:00
zccrs
9279b9640e
Revert "chore: Update dsysinfo.cpp"
...
This reverts commit 3c85297d3f .
2022-12-13 12:22:24 +08:00
QinBenxue
3c85297d3f
chore: Update dsysinfo.cpp
...
QStorageInfo::root().device()扫描的是/etc/mtab里的内容,但是有的根节点就只会显示/dev/root,这个会导致在控制中心显示磁盘容量的时候不能 显示,故现更改获取根挂载点的方式,在lsblk的方法上增加。
Log:
2022-12-12 07:37:36 +00:00
bluesky
2cd5464f08
docs: add docs for ddesktopentry
...
给ddesktopentry添加文档注释
Log: add docs
Task: deepin-community/coding-quarter#26
2022-12-10 23:39:38 +00:00
bluesky
fb423dae3f
docs: add docs for dconfigfile
...
给dconfigfile添加文档注释
Log: add docs
Task: deepin-community/coding-quarter#26
2022-12-08 22:50:20 +08:00
bluesky
f53f9f3c43
docs: add docs for settings
...
给qsettingbackend添加文档注释
Log: add docs
Task: deepin-community/coding-quarter#26
2022-12-04 03:01:44 -06:00
bluesky
2f267c0eda
docs: add docs for settings
...
给gsettingsbackend添加文档注释
Log: add docs
Task: deepin-community/coding-quarter#26
2022-12-03 22:16:52 -06:00
bluesky
1785a16d98
docs: add docs for settings
...
给dsettingsdconfigbackend添加文档注释
Log: add docs
Task: deepin-community/coding-quarter#26
2022-12-02 23:23:34 -06:00
bluesky
3234c94829
docs: add docs for settings
...
给dsettingsoption添加文档注释
Log: add docs
Task: https://github.com/deepin-community/coding-quarter/issues/26
2022-12-02 09:03:59 +00:00
bluesky
f4252ebf58
docs: add docs for settings
...
给dsettingsgroup添加文档注释
Log: add docs
Task: https://github.com/deepin-community/coding-quarter/issues/26
2022-12-02 04:48:54 +00:00
Astrea
cb5b7f15ea
docs: add docs for formatters
...
Add docs for DDiskSizeFormatter and DTimeUnitFormatter.
Log: add docs for formatters
2022-12-01 21:21:29 +08:00
bluesky
56346c334b
docs: add docs for settings
...
给dsettings添加文档注释
Log: add docs
Task: https://github.com/deepin-community/coding-quarter/issues/26
2022-12-01 05:31:11 +00:00
Astrea
724696bdf6
chore: format code
...
Add .clang-format. Format code that has been modified by commit
e6423c5 .
Log: format code
Influence: e6423c5
2022-11-30 02:24:08 -06:00
Astrea
c3b81cb348
docs: add docs for util
...
Add docs for DDBusExtendedAbstractInterface.
Log: add docs
Influence: None
2022-11-30 02:24:08 -06:00
Astrea
7e35e14558
chore!: move namespace
...
Move DDBusExtendedAbstractInterface and DDBusExtendedPendingCallWatcher
to Dtk::Core.
Log: move namespace
Influence: DDBusAbstractInterface, DDBusExtendedPendingCallWatcher
2022-11-30 02:24:08 -06:00
bluesky
a0e660c71d
docs: add dconfig docs
...
添加dconfig文档注释
Log:
2022-11-26 02:41:23 -06:00
Astrea
a42cf2255d
docs: update docs for util
...
Update docs for dabstractunitformatter.h.
Log: update docs
Influence: none
2022-11-25 04:48:11 -06:00
ck
20326640cc
fix: missing implementation and obsolete Member
...
add missing imple of rollingfileappender
use Use QFile::symLinkTarget() instead of QFile::readLink()
Log: none
Influence: none
Change-Id: I7cf642fed010bcb73f1c3ebca0c2bfd3a6795dad
2022-11-25 17:25:53 +08:00
xzl
ebba3ae365
docs: update filesystem documents
...
更新filesystem文档
Log:
2022-11-24 04:07:22 -06:00
xzl
49b566c4a3
docs: update dlog documents
...
更新dlog文档
Log:
2022-11-24 01:01:23 -06:00
xzl
fa81207750
docs: update Logger documents
...
更新logger的文档
Log:
2022-11-23 20:09:01 -06:00
xzl
39f7385688
docs: Standardize documents, add groups
...
规范文档,添加分组
Log:
2022-11-22 02:55:51 -06:00
wang fei
c2f03ad13c
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:10:53 +00:00
xzl
ec7efcf4a0
docs: update docs dlog modules
...
更新dlog模块的文档
Log:
2022-11-22 01:06:48 -06:00
xzl
cd06007fc4
docs: update docs
...
更新DLogManager文档,修改代码中的文档
Log:
2022-11-21 02:29:42 -06:00
ck
8d29493870
fix: Logger constructor crash
...
LoggerPrivate not init..
Log: 修复帮助手册在升级dtkcore后无法打开的问题
Bug: https://pms.uniontech.com/bug-view-172121.html
Change-Id: Ieee74154a33260043af264a176dabc672a17f559
2022-11-17 03:30:14 -06:00
xzl
ad3a47a6aa
docs: update doxygen docs
...
更新doxygen文档
TODO: 清理已经添加文档代码中中文注释
Log:
2022-11-16 02:17:15 -06:00
ck
3a65c261d1
fix: missing sw_64 architecture
...
fix sw_64 build failed
Log: none
Change-Id: I0f0b997eeab1452155b0c4d0da11454e1df1de4e
2022-11-10 15:20:52 +08:00
范朋程
554d22da1a
feat: add ddbusextendedabstractinterface
...
通过此类可以很方便得实现异步dbus通信
修改tools生成信息中的类名
Log: add ddbusextendedabstractinterface
Change-Id: Ida45d0d22d065af3d86c7ad062419183572291dc
feat: add ddbusextendedabstractinterface
通过此类可以很方便得实现异步dbus通信
Log: add ddbusextendedabstractinterface
Change-Id: Ida45d0d22d065af3d86c7ad062419183572291dc
2022-10-31 15:20:34 +08:00
chenhongtao
7aa6f4725d
fix: missingdefinition
...
the first time turn to cmake, the definition is missing
Log: return the missingdefinition
2022-10-27 05:40:29 +00:00
Ye ShanShan
8cea334b09
fix: DDbusInterface Can't route complex dbus type
...
QVariant's typeName is not work for complex dbus data type,
(e.g: QList<QDBusObjectPath>), and it causes QMetaObject'indexOfSignal
return -1.
We add a special action for DBusArgument Type,
Add type cast to get typeName and demarshall to get data.
Log: 解决DDbusInterface不能转发复杂DBus类型的信号问题
Influence: none
Change-Id: I1e90f96af384393065ed554daf6a3bb46d32bc39
2022-10-26 13:28:27 +00:00
ck
5c48bd4c84
feat: add sysinfo interface
...
bootTime; shutdownTime; uptime; arch
Log:
Change-Id: I460a517a6bdb6a980ebf8a6956c1dc8041274985
2022-10-26 18:10:08 +08:00
heyuming
a32e231fd4
chore: add CMake rules for installing dexpected.h
...
以及derror.h
Log: 添加dexpected.h的CMake安装规则
2022-10-24 02:36:46 +00:00