fix: prevent theme saving when DontSaveApplicationTheme is set#315
fix: prevent theme saving when DontSaveApplicationTheme is set#315deepin-bot[bot] merged 2 commits intolinuxdeepin:masterfrom
Conversation
18202781743
commented
May 8, 2025
- fix: prevent theme saving when DontSaveApplicationTheme is set
- fix: correct bitwise operation in preference handling
Added a condition to check DontSaveApplicationTheme attribute before saving theme type to config This prevents unwanted theme persistence when the application explicitly requests not to save theme preferences The change maintains backward compatibility while respecting the application's preference flag fix: 当设置DontSaveApplicationTheme时阻止主题保存 在将主题类型保存到配置前添加了检查DontSaveApplicationTheme属性的条件 这可以防止当应用程序明确要求不保存主题偏好时进行不必要的主题持久化 该改动在尊重应用程序偏好标志的同时保持了向后兼容性
1. Fixed incorrect bitwise AND operation in OrgDeepinDTKPreference class 2. Changed `fetchAndAndOrdered(1 << (index - 0))` to `fetchAndAndOrdered(~(1 << (index - 0)))` 3. This ensures proper bit clearing operation when updating property status flags 4. The original code would incorrectly set bits instead of clearing them fix: 修复偏好设置处理中的位操作错误 1. 修正了 OrgDeepinDTKPreference 类中错误的位与操作 2. 将 `fetchAndAndOrdered(1 << (index - 0))` 改为 `fetchAndAndOrdered(~(1 << (index - 0)))` 3. 确保在更新属性状态标志时正确的位清除操作 4. 原代码会错误地设置位而不是清除它们
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#315
deepin pr auto review代码审查意见:
|
|
Note
详情{
"src/kernel/dguiapplicationhelper.cpp": [
{
"line": " QString socket_key = \"_d_dtk_single_instance_\";",
"line_number": 1468,
"rule": "S106",
"reason": "Var naming | 2ad926d35b"
}
]
} |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy 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 |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#315