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
2 changes: 1 addition & 1 deletion deepin-devicemanager/assets/org.deepin.devicemanager.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
],
"name": "Special Computer Type",
"name[zh_CN]": "特殊机器类型",
"description": "special computer type:PGUW(value:1),KLVV/L540(value:2),KLVU(value:3),PGUV/W585(value:4),PGUX(value:5)",
"description": "special computer type:PGUW(value:1),KLVV/L540(value:2),KLVU(value:3),PGUV/W585(value:4),PGUX(value:5),FLMX(value:6)",
"permissions": "readwrite",
"visibility": "private"
},
Expand Down
4 changes: 3 additions & 1 deletion deepin-devicemanager/src/DeviceManager/DeviceMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ void DeviceMemory::loadBaseDeviceInfo()
qCDebug(appLog) << "Loading base device info for memory";
// 添加基本信息
addBaseDeviceInfo("Name", m_Name);
addBaseDeviceInfo("Vendor", m_Vendor);
if (Common::specialComType <= 0) {
addBaseDeviceInfo(("Vendor"), m_Vendor);
}
addBaseDeviceInfo("Size", m_Size);
addBaseDeviceInfo("Type", m_Type);
addBaseDeviceInfo("Speed", m_Speed);
Expand Down
4 changes: 3 additions & 1 deletion deepin-devicemanager/src/DeviceManager/DeviceStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,9 @@ void DeviceStorage::loadBaseDeviceInfo()
qCDebug(appLog) << "DeviceStorage::loadBaseDeviceInfo";
// 添加基本信息
addBaseDeviceInfo("Name", m_Name);
addBaseDeviceInfo("Vendor", m_Vendor);
if (Common::specialComType <= 0) {
addBaseDeviceInfo(("Vendor"), m_Vendor);
}
addBaseDeviceInfo("Media Type", translateStr(m_MediaType));
addBaseDeviceInfo("Size", m_Size);
addBaseDeviceInfo("Version", m_Version);
Expand Down
1 change: 1 addition & 0 deletions deepin-devicemanager/src/DeviceManager/DeviceStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#ifndef DEVICESTORAGE_H
#define DEVICESTORAGE_H
#include"DeviceInfo.h"
#include "commonfunction.h"

Check warning on line 9 in deepin-devicemanager/src/DeviceManager/DeviceStorage.h

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "commonfunction.h" not found.

/**
* @brief The DeviceStorage class
Expand Down
7 changes: 2 additions & 5 deletions deepin-devicemanager/src/GenerateDevice/DeviceFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
#include "X86Generator.h"
#include "MipsGenerator.h"
#include "ArmGenerator.h"
#include "PanguGenerator.h"
#include "PanguVGenerator.h"
#include "HWGenerator.h"
#include "commonfunction.h"

Check warning on line 11 in deepin-devicemanager/src/GenerateDevice/DeviceFactory.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "commonfunction.h" not found.
#include "PanguxGenerator.h"
#include "DDLog.h"

Check warning on line 12 in deepin-devicemanager/src/GenerateDevice/DeviceFactory.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "DDLog.h" not found.

// Qt库文件
#include <QProcess>
Expand Down Expand Up @@ -48,13 +45,13 @@
generator = new HWGenerator();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: Debug log messages no longer match the actual generator type being instantiated.

For type == "PGUV" || type == "PGUW" (and PGUX), the log still says create PanguVGenerator / create PanguXGenerator while the code now instantiates HWGenerator. This mismatch can confuse field debugging; please update the messages (or centralize logging in a helper) so they reflect the actual generator class being created.

} else if (type == "PGUV" || type == "PGUW") {
qCDebug(appLog) << "DeviceFactory::getDeviceGenerator create PanguVGenerator";
generator = new PanguVGenerator();
generator = new HWGenerator();
} else if (type == "KLVU") {
qCDebug(appLog) << "DeviceFactory::getDeviceGenerator create KLUGenerator";
generator = new HWGenerator();
} else if (type == "PGUX") {
qCDebug(appLog) << "DeviceFactory::getDeviceGenerator create PanguXGenerator";
generator = new PanguXGenerator();
generator = new HWGenerator();
} else {
qCDebug(appLog) << "DeviceFactory::getDeviceGenerator create HWGenerator";
generator = new HWGenerator();
Expand Down
15 changes: 0 additions & 15 deletions deepin-devicemanager/src/GenerateDevice/HWGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,21 +502,6 @@ static void parseEDID(QStringList allEDIDS,QString input)

void HWGenerator::generatorMonitorDevice()
{
qCDebug(appLog) << "HWGenerator::generatorMonitorDevice start";

QMap<QString, QString> mapInfo;
mapInfo.insert("Name", "LCD");
mapInfo.insert("Current Resolution", "2160x1440");
mapInfo.insert("Support Resolution", "2160x1440");
mapInfo.insert("Size", "14 Inch");
mapInfo.insert("Interface Type", "eDP");
mapInfo.insert("Refresh Rate", "60Hz");

DeviceMonitor *monitor = new DeviceMonitor();
monitor->setInfoFromTomlBase(mapInfo);
monitor->setInfoFromTomlOneByOne(mapInfo);
DeviceManager::instance()->addMonitor(monitor);

QString toDir = "/sys/class/drm";
QDir toDir_(toDir);

Expand Down
99 changes: 0 additions & 99 deletions deepin-devicemanager/src/GenerateDevice/PanguGenerator.cpp

This file was deleted.

26 changes: 0 additions & 26 deletions deepin-devicemanager/src/GenerateDevice/PanguGenerator.h

This file was deleted.

175 changes: 0 additions & 175 deletions deepin-devicemanager/src/GenerateDevice/PanguVGenerator.cpp

This file was deleted.

Loading