Skip to content

Commit 6d6a4a4

Browse files
18202781743deepin-bot[bot]
authored andcommitted
fix: correct bitwise operation in preference handling
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. 原代码会错误地设置位而不是清除它们
1 parent ed25223 commit 6d6a4a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/kernel/orgdeepindtkpreference.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* This file is generated by dconfig2cpp.
33
* Command line arguments: ./build5/tools/dconfig2cpp/dconfig2cpp -c OrgDeepinDTKPreference /usr/share/dsg/configs/org.deepin.dtk.preference.json
4-
* Generation time: 2025-05-06T19:45:14
4+
* Generation time: 2025-05-08T17:31:56
55
* JSON file version: 1.0
66
*
77
* WARNING: DO NOT MODIFY THIS FILE MANUALLY.
@@ -711,7 +711,7 @@ class OrgDeepinDTKPreference : public QObject {
711711
if (on)
712712
m_propertySetStatus0.fetchAndOrOrdered(1 << (index - 0));
713713
else
714-
m_propertySetStatus0.fetchAndAndOrdered(1 << (index - 0));
714+
m_propertySetStatus0.fetchAndAndOrdered(~(1 << (index - 0)));
715715
return;
716716
}
717717
Q_UNREACHABLE();

0 commit comments

Comments
 (0)