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
3 changes: 2 additions & 1 deletion deepin-devicemanager/src/DeviceManager/DeviceCpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ void DeviceCpu::setCpuInfo(const QMap<QString, QString> &mapLscpu, const QMap<QS
m_MaxFrequency = m_MaxFrequency.replace(CPU_MAXFREQ_TYPE5_7_OLD, CPU_MAXFREQ_TYPE5_7_NEW);
}

if (Common::specialComType == Common::kSpecialType9) {
if (Common::specialComType == Common::kSpecialType9 ||
Common::specialComType == Common::kSpecialType10) {
m_Frequency = m_Frequency.replace(CPU_FREQ_TYPE9_OLD, CPU_FREQ_TYPE9_NEW);
m_MaxFrequency = m_MaxFrequency.replace(CPU_MAXFREQ_TYPE9_OLD, CPU_MAXFREQ_TYPE9_NEW);
}
Expand Down
17 changes: 11 additions & 6 deletions deepin-devicemanager/src/DeviceManager/DeviceMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,17 @@ const QString DeviceMonitor::getOverviewInfo()
if (Common::isShowScreenSize()) {
if (Common::specialComType == Common::kSpecialType6 ||
Common::specialComType == Common::kSpecialType7 ||
Common::specialComType == Common::kSpecialType9) {
Common::specialComType == Common::kSpecialType9 ||
Common::specialComType == Common::kSpecialType10) {
ov = QString("(%1)").arg(m_ScreenSize);
} else {
ov = QString("%1(%2)").arg(m_Name).arg(m_ScreenSize);
}
} else {
if (Common::specialComType == Common::kSpecialType6 ||
Common::specialComType == Common::kSpecialType7 ||
Common::specialComType == Common::kSpecialType9) {
Common::specialComType == Common::kSpecialType9 ||
Common::specialComType == Common::kSpecialType10) {
ov = "";
} else {
ov = QString("%1").arg(m_Name);
Expand All @@ -331,7 +333,8 @@ void DeviceMonitor::loadBaseDeviceInfo()
if (Common::specialComType != Common::kSpecialType5 &&
Common::specialComType != Common::kSpecialType6 &&
Common::specialComType != Common::kSpecialType7 &&
Common::specialComType != Common::kSpecialType9) {
Common::specialComType != Common::kSpecialType9 &&
Common::specialComType != Common::kSpecialType10) {
addBaseDeviceInfo(("Name"), m_Name);
addBaseDeviceInfo(("Vendor"), m_Vendor);
addBaseDeviceInfo(("Type"), m_Model);
Expand Down Expand Up @@ -415,15 +418,17 @@ bool DeviceMonitor::setMainInfoFromXrandr(const QString &info, const QString &ra
}
if (Common::specialComType == Common::kSpecialType1 ||
Common::specialComType == Common::kSpecialType5 ||
Common::specialComType == Common::kSpecialType6 ||
Common::specialComType == Common::kSpecialType6 ||
Common::specialComType == Common::kSpecialType7 ||
Common::specialComType == Common::kSpecialType9) {
Common::specialComType == Common::kSpecialType9 ||
Common::specialComType == Common::kSpecialType10) {
m_RefreshRate = QString("%1").arg(curRate);
}
if (Common::specialComType == Common::kSpecialType5 ||
Common::specialComType == Common::kSpecialType6 ||
Common::specialComType == Common::kSpecialType7 ||
Common::specialComType == Common::kSpecialType9) {
Common::specialComType == Common::kSpecialType9 ||
Common::specialComType == Common::kSpecialType10) {
m_CurrentResolution = QString("%1").arg(reScreenSize.cap(1)).replace("x", "×", Qt::CaseInsensitive);
} else {
m_CurrentResolution = QString("%1 @%2").arg(reScreenSize.cap(1)).arg(curRate).replace("x", "×", Qt::CaseInsensitive);
Expand Down
9 changes: 6 additions & 3 deletions deepin-devicemanager/src/Tool/EDIDParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,12 @@ void EDIDParser::parseScreenSize()
}
}

if (Common::specialComType == Common::kSpecialType7){ // sepcial task:378963
m_Width = 296;
m_Height = 197;
if (Common::specialComType == Common::kSpecialType7 ||
Common::specialComType == Common::kSpecialType10) { // special task:378963
if (m_Width == 300 && m_Height == 200) {
m_Width = 296;
m_Height = 197;
}
}
double inch = sqrt((m_Width / 2.54) * (m_Width / 2.54) + (m_Height / 2.54) * (m_Height / 2.54))/10;
m_ScreenSize = QString("%1 %2(%3mm×%4mm)")
Expand Down
3 changes: 2 additions & 1 deletion deepin-devicemanager/src/commonfunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class Common
kSpecialType6,
kSpecialType7,
kSpecialType8,
kSpecialType9
kSpecialType9,
kSpecialType10
};

enum SpecialCpuType {
Expand Down
Loading