Skip to content

Commit 04dbc56

Browse files
fly602deepin-bot[bot]
authored andcommitted
chore: remove touchpad switch file existence check
Removed the touchpad switch file existence check functionality from the mouse settings plugin. The implementation included: 1. Deleted touchpadSwitchFileExists() method from MouseModel class 2. Removed corresponding Q_PROPERTY declaration from header file 3. Eliminated visibility condition based on file existence in QML UI This change was made because the touchpad switch file check is no longer needed in the current system configuration. The file path "/proc/ uos/touchpad_switch" was specific to a particular environment and the functionality has become obsolete with system updates. Log: Removed touchpad switch file existence verification from mouse settings Influence: 1. Verify touchpad settings page loads correctly without file existence check 2. Test touchpad functionality remains operational 3. Confirm no regression in mouse/touchpad configuration options 4. Validate UI layout consistency after removing the conditional visibility chore: 移除触摸板开关文件存在性检查 从鼠标设置插件中移除了触摸板开关文件存在性检查功能。具体修改包括: 1. 从 MouseModel 类中删除了 touchpadSwitchFileExists() 方法 2. 从头文件中移除了对应的 Q_PROPERTY 声明 3. 在 QML 界面中移除了基于文件存在性的可见性条件 进行此更改是因为在当前系统配置中不再需要触摸板开关文件检查。文件路径 "/ proc/uos/touchpad_switch" 特定于某个环境,随着系统更新该功能已变得过时。 Log: 从鼠标设置中移除了触摸板开关文件存在性验证 PMS: BUG-342407 Influence: 1. 验证触摸板设置页面在没有文件存在性检查时正确加载 2. 测试触摸板功能保持正常运行 3. 确认鼠标/触摸板配置选项没有回归问题 4. 验证移除条件可见性后 UI 布局的一致性
1 parent 1bd24aa commit 04dbc56

File tree

3 files changed

+0
-9
lines changed

3 files changed

+0
-9
lines changed

src/plugin-mouse/operation/mousemodel.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,6 @@ void MouseModel::setThemeType(const Dtk::Gui::DGuiApplicationHelper::ColorType &
430430
emit themeTypeChanged();
431431
}
432432

433-
bool MouseModel::touchpadSwitchFileExists() const
434-
{
435-
return QFile::exists("/proc/uos/touchpad_switch");
436-
}
437-
438433
DCC_FACTORY_CLASS(MouseModel)
439434

440435
#include "mousemodel.moc"

src/plugin-mouse/operation/mousemodel.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class MouseModel : public QObject
3838
Q_PROPERTY(bool tapEnabled READ tapEnabled WRITE setTapEnabled NOTIFY tapEnabledChanged FINAL)
3939
Q_PROPERTY(QString gestureFingerAniPath READ getGestureFingerAniPath NOTIFY gestureFingerAniPathChanged FINAL)
4040
Q_PROPERTY(QString gestureActionAniPath READ getGestureActionAniPath NOTIFY gestureActionAniPathChanged FINAL)
41-
Q_PROPERTY(bool touchpadSwitchFileExists READ touchpadSwitchFileExists CONSTANT)
4241
Q_PROPERTY(int cursorSize READ cursorSize WRITE setCursorSize NOTIFY cursorSizeChanged FINAL)
4342
Q_PROPERTY(QList<int> availableCursorSizes READ availableCursorSizes WRITE setAvailableCursorSizes NOTIFY availableCursorSizesChanged FINAL)
4443

@@ -120,8 +119,6 @@ class MouseModel : public QObject
120119
QString getGestureActionAniPath() const;
121120
void setGestureActionAniPath(const QString &newGestureActionAniPath);
122121

123-
bool touchpadSwitchFileExists() const;
124-
125122
Dtk::Gui::DGuiApplicationHelper::ColorType themeType() const;
126123

127124
void updateFigerAniPath(QString actionName = "", GestureData* data = nullptr);

src/plugin-mouse/qml/Touchpad.qml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ DccObject {
5353
weight: 20
5454
backgroundType: DccObject.Normal
5555
pageType: DccObject.Editor
56-
visible: dccData.touchpadSwitchFileExists
5756
page: D.Switch {
5857
Layout.rightMargin: 10
5958
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter

0 commit comments

Comments
 (0)