Skip to content
Open
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
6 changes: 3 additions & 3 deletions deepin-devicemanager/src/DeviceManager/DeviceMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void DeviceMonitor::setInfoFromHwinfo(const QMap<QString, QString> &mapInfo)
setAttribute(mapInfo, "", m_DisplayInput);
setAttribute(mapInfo, "Size", m_ScreenSize);
setAttribute(mapInfo, "", m_MainScreen);
if (Common::isHwPlatform()){
if (!Common::isHwPlatform()){
setAttribute(mapInfo, "Resolution", m_SupportResolution);
}
qCDebug(appLog) << "Basic monitor attributes set - Name:" << m_Name << "Vendor:" << m_Vendor << "Model:" << m_Model;
Expand All @@ -117,7 +117,7 @@ void DeviceMonitor::setInfoFromHwinfo(const QMap<QString, QString> &mapInfo)
qCDebug(appLog) << "Screen size parsed:" << m_ScreenSize << "Width:" << size.width() << "Height:" << size.height();

// 获取当前分辨率 和 当前支持分辨率
if (Common::isHwPlatform()){
if (!Common::isHwPlatform()){
QStringList listResolution = m_SupportResolution.split(" ");
m_SupportResolution = "";
foreach (const QString &word, listResolution) {
Expand All @@ -131,7 +131,7 @@ void DeviceMonitor::setInfoFromHwinfo(const QMap<QString, QString> &mapInfo)
// 计算显示比例
caculateScreenRatio();

if (Common::isHwPlatform()){
if (!Common::isHwPlatform()){
m_SupportResolution.replace(QRegularExpression(", $"), "");
}
qCDebug(appLog) << "Supported resolutions processed:" << m_SupportResolution;
Expand Down
2 changes: 1 addition & 1 deletion deepin-devicemanager/src/GenerateDevice/CmdTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ void CmdTool::getMapInfoFromSmartctl(QMap<QString, QString> &mapInfo, const QStr

indexName = "";

QRegularExpression rx("^[ ]*[0-9]+[ ]+([\\w-_]+)[ ]+0x[0-9a-fA-F-]+[ ]+[0-9]+[ ]+[0-9]+[ ]+[0-9]+[ ]+[\\w-]+[ ]+[\\w-]+[ ]+[\\w-]+[ ]+([0-9\\/w-]+[ ]*[ 0-9\\/w-()]*)$");
QRegularExpression rx("^[ ]*[0-9]+[ ]+([\\w_-]+)[ ]+0x[0-9a-fA-F-]+[ ]+[0-9]+[ ]+[0-9]+[ ]+[0-9]+[ ]+[\\w-]+[ ]+[\\w-]+[ ]+[\\w-]+[ ]+([0-9\\w\\/-]+[ ]*[0-9\\w\\/\\-\\(\\)]*)$");
if (rx.match(line).hasMatch()) {
// qCDebug(appLog) << "Matched smartctl attribute regex:" << line;
mapInfo[rx.match(line).captured(1)] = rx.match(line).captured(2);
Expand Down