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
2 changes: 1 addition & 1 deletion backends/kylin-assistant-daemon/src/sysinfo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def get_distro(self):
def get_desktop(self):
apt_cache = apt.Cache()
try:
package = apt_cache["kylin-menu"]
package = apt_cache["ukui-session-manager"]
except:
package = None
if package is not None and package.is_installed:
Expand Down
35 changes: 35 additions & 0 deletions info/devicemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ QStringList DeviceManager::getDeviceMsg(){
//add graphics & sound
deviceMsgList.append("VGA compatible controller: Mali-G76;driver in use:mali");
deviceMsgList.append("Audio device:da_combine_v5;driver in use:hi3xxx_DA_combine_v5");
if(isPanguV()){
deviceMsgList.append("Ethernet controller:RTL8153;driver in use:r8152");
deviceMsgList.append("Network controller:hisi_soc;driver in use:hi110x_board");
}
}
qDebug() << deviceMsgList;
return deviceMsgList;
Expand All @@ -84,3 +88,34 @@ bool DeviceManager::isHW990(){
}
return isHW990;
}

bool DeviceManager::isPanguV(){
QString cmd = "dmidecode -t system";

QProcess *p = new QProcess();
p->start(cmd);
p->waitForFinished();

QStringList tmpList;
while(p->canReadLine()){
QString str = p->readLine();
str = str.left(str.length() - 1);
tmpList.append(str);
}

QString tmps;
QStringList deviceMsgList;
bool foundW515 = false;
for (int i = 0;i < tmpList.size();i ++) {
QString str = tmpList.at(i);

if (str.contains("Version: W515")){
foundW515 = true;
break;
} else {
continue;
}
}

return foundW515;
}
1 change: 1 addition & 0 deletions info/devicemanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class DeviceManager : public QObject
Q_OBJECT
public:
bool isHW990();
bool isPanguV();
explicit DeviceManager(QObject *parent = 0);

//得到硬件设备及其驱动信息
Expand Down