Skip to content
Merged
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
21 changes: 15 additions & 6 deletions deepin-devicemanager/src/DeviceManager/DeviceMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
#include "EDIDParser.h"
#include "commonfunction.h"
#include "commondefine.h"
#include "DDLog.h"

Check warning on line 10 in deepin-devicemanager/src/DeviceManager/DeviceMonitor.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "DDLog.h" not found.

#include <DApplication>

Check warning on line 12 in deepin-devicemanager/src/DeviceManager/DeviceMonitor.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

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

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

View workflow job for this annotation

GitHub Actions / cppcheck

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

// Qt库文件
#include <QLoggingCategory>

Check warning on line 16 in deepin-devicemanager/src/DeviceManager/DeviceMonitor.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 <QDate>
#include <QSize>
#include <QRegularExpression>
Expand All @@ -22,6 +23,7 @@

DWIDGET_USE_NAMESPACE
using namespace DDLog;
DCORE_USE_NAMESPACE

DeviceMonitor::DeviceMonitor()
: DeviceBaseInfo()
Expand Down Expand Up @@ -409,12 +411,19 @@
}
}
}
addOtherDeviceInfo("Primary Monitor", m_MainScreen);
if (Common::isShowScreenSize())
addOtherDeviceInfo("Size", m_ScreenSize);
addOtherDeviceInfo("Serial Number", m_SerialNumber);
// addOtherDeviceInfo("Product Date", m_ProductionWeek);

addOtherDeviceInfo(("Primary Monitor"), m_MainScreen);
bool showScreenSize { true };

Check warning on line 415 in deepin-devicemanager/src/DeviceManager/DeviceMonitor.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Condition 'showScreenSize' is always true

#ifdef DTKCORE_CLASS_DConfigFile
DConfig *dconfig = DConfig::create("org.deepin.devicemanager","org.deepin.devicemanager");
if(dconfig && dconfig->isValid() && dconfig->keyList().contains("showScreenSize")){
showScreenSize = dconfig->value("showScreenSize").toBool();
}
#endif
if (showScreenSize)
addOtherDeviceInfo(("Size"), m_ScreenSize);
addOtherDeviceInfo(("Serial Number"), m_SerialNumber);
// addOtherDeviceInfo(("Product Date"), m_ProductionWeek);
mapInfoToList();
qCDebug(appLog) << "Other device info loaded";
}
Expand Down
Loading