Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions deepin-devicemanager/src/DeviceManager/DeviceInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
#include "DBusWakeupInterface.h"

// Qt库文件
#include <QLoggingCategory>

Check warning on line 13 in deepin-devicemanager/src/DeviceManager/DeviceInput.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QLoggingCategory> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QProcess>

Check warning on line 14 in deepin-devicemanager/src/DeviceManager/DeviceInput.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QProcess> not found. Please note: Cppcheck does not need standard library headers to get proper results.

QStringList DeviceInput::m_supportInterfaces= {"PS/2", "Bluetooth", "I2C"};

DeviceInput::DeviceInput()
: DeviceBaseInfo()
, m_Model("")
Expand Down Expand Up @@ -387,9 +389,9 @@
if (driver().isEmpty()) {
m_Available = false;
}
if ("PS/2" == m_Interface || "Bluetooth" == m_Interface || "I2C" == m_Interface) {
m_Available = true;
}

m_Available = m_supportInterfaces.contains(m_Interface, Qt::CaseInsensitive);

return m_forcedDisplay ? m_forcedDisplay : m_Available;
}

Expand Down
2 changes: 2 additions & 0 deletions deepin-devicemanager/src/DeviceManager/DeviceInput.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ class DeviceInput : public DeviceBaseInfo
bool m_wakeupChanged = true; //<! 记录鼠标的唤醒状态

QString m_keysToPairedDevice; //<! 【用来标识蓝牙键盘】

static QStringList m_supportInterfaces; //<! 【支持的所有蓝牙接口】
};

#endif // DEVICEINPUT_H