!14 update to 5.6.34
From: @leeffo Reviewed-by: @HelloWorld_lvcongqing Signed-off-by: @HelloWorld_lvcongqing
This commit is contained in:
commit
9dca31ca9a
104
0001-feat-rewrite-loadDeviceInfo-updateDeviceInfo.patch
Normal file
104
0001-feat-rewrite-loadDeviceInfo-updateDeviceInfo.patch
Normal file
@ -0,0 +1,104 @@
|
||||
From 49bb174c8264545c61b3315ef8f2785da71a2c70 Mon Sep 17 00:00:00 2001
|
||||
From: leeffo <leeffo@yeah.net>
|
||||
Date: Thu, 9 Feb 2023 15:33:43 +0800
|
||||
Subject: [PATCH] feat: rewrite loadDeviceInfo updateDeviceInfo
|
||||
|
||||
---
|
||||
.../src/LoadInfo/ThreadPool.cpp | 58 ++++++++++++++++---
|
||||
1 file changed, 50 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/deepin-devicemanager-server/src/LoadInfo/ThreadPool.cpp b/deepin-devicemanager-server/src/LoadInfo/ThreadPool.cpp
|
||||
index 911c4ee..6c358ce 100644
|
||||
--- a/deepin-devicemanager-server/src/LoadInfo/ThreadPool.cpp
|
||||
+++ b/deepin-devicemanager-server/src/LoadInfo/ThreadPool.cpp
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <QProcess>
|
||||
#include <QDir>
|
||||
#include <QDebug>
|
||||
+#include <QDateTime>
|
||||
|
||||
ThreadPool::ThreadPool(QObject *parent)
|
||||
: QThreadPool(parent)
|
||||
@@ -16,31 +17,72 @@ ThreadPool::ThreadPool(QObject *parent)
|
||||
dir.mkdir(PATH);
|
||||
}
|
||||
|
||||
+//void ThreadPool::loadDeviceInfo()
|
||||
+//{
|
||||
+// // 根据m_ListCmd生成所有设备信息
|
||||
+// QObjectCleanupHandler *cleaner = new QObjectCleanupHandler;
|
||||
+// cleaner->setParent(this);
|
||||
+// QList<Cmd>::iterator it = m_ListCmd.begin();
|
||||
+// for (; it != m_ListCmd.end(); ++it) {
|
||||
+// ThreadPoolTask *task = new ThreadPoolTask((*it).cmd, (*it).file, (*it).canNotReplace, (*it).waitingTime);
|
||||
+// cleaner->add(task);
|
||||
+// start(task);
|
||||
+// task->setAutoDelete(true);
|
||||
+// }
|
||||
+//}
|
||||
+//
|
||||
+//void ThreadPool::updateDeviceInfo()
|
||||
+//{
|
||||
+// // 根据m_ListCmd生成所有设备信息
|
||||
+// QObjectCleanupHandler *cleaner = new QObjectCleanupHandler;
|
||||
+// cleaner->setParent(this);
|
||||
+// QList<Cmd>::iterator it = m_ListUpdate.begin();
|
||||
+// for (; it != m_ListUpdate.end(); ++it) {
|
||||
+// ThreadPoolTask *task = new ThreadPoolTask((*it).cmd, (*it).file, (*it).canNotReplace, (*it).waitingTime);
|
||||
+// cleaner->add(task);
|
||||
+// start(task);
|
||||
+// task->setAutoDelete(true);
|
||||
+// }
|
||||
+//}
|
||||
+
|
||||
void ThreadPool::loadDeviceInfo()
|
||||
{
|
||||
// 根据m_ListCmd生成所有设备信息
|
||||
- QObjectCleanupHandler *cleaner = new QObjectCleanupHandler;
|
||||
- cleaner->setParent(this);
|
||||
QList<Cmd>::iterator it = m_ListCmd.begin();
|
||||
for (; it != m_ListCmd.end(); ++it) {
|
||||
ThreadPoolTask *task = new ThreadPoolTask((*it).cmd, (*it).file, (*it).canNotReplace, (*it).waitingTime);
|
||||
- cleaner->add(task);
|
||||
- start(task);
|
||||
task->setAutoDelete(true);
|
||||
+ start(task);
|
||||
+ }
|
||||
+
|
||||
+ // 当所有设备执行完毕之后,开始执行生成其它设备的任务
|
||||
+ // 这里是为了确保其它设备在最后一个生成
|
||||
+ qint64 beginMSecond = QDateTime::currentMSecsSinceEpoch();
|
||||
+ while (true) {
|
||||
+ qint64 curMSecond = QDateTime::currentMSecsSinceEpoch();
|
||||
+ if (activeThreadCount() == 0 || curMSecond - beginMSecond > 10000) {
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
void ThreadPool::updateDeviceInfo()
|
||||
{
|
||||
// 根据m_ListCmd生成所有设备信息
|
||||
- QObjectCleanupHandler *cleaner = new QObjectCleanupHandler;
|
||||
- cleaner->setParent(this);
|
||||
QList<Cmd>::iterator it = m_ListUpdate.begin();
|
||||
for (; it != m_ListUpdate.end(); ++it) {
|
||||
ThreadPoolTask *task = new ThreadPoolTask((*it).cmd, (*it).file, (*it).canNotReplace, (*it).waitingTime);
|
||||
- cleaner->add(task);
|
||||
- start(task);
|
||||
task->setAutoDelete(true);
|
||||
+ start(task);
|
||||
+ }
|
||||
+ // 当所有设备执行完毕之后,开始执行生成其它设备的任务
|
||||
+ // 这里是为了确保其它设备在最后一个生成
|
||||
+ qint64 beginMSecond = QDateTime::currentMSecsSinceEpoch();
|
||||
+ while (true) {
|
||||
+ qint64 curMSecond = QDateTime::currentMSecsSinceEpoch();
|
||||
+ if (activeThreadCount() == 0 || curMSecond - beginMSecond > 10000) {
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1
|
||||
@ -1,710 +0,0 @@
|
||||
From 72996fcb57b084ab60d0233abb3b348d9032f287 Mon Sep 17 00:00:00 2001
|
||||
From: kkz <zhaoshuang@uniontech.com>
|
||||
Date: Mon, 16 Aug 2021 16:46:47 +0800
|
||||
Subject: [PATCH] fix-show-256-core-cpuinfo-issue
|
||||
|
||||
---
|
||||
.../src/DeviceManager/DeviceCpu.cpp | 2 +-
|
||||
.../translations/deepin-devicemanager.ts | 213 +++++++++---------
|
||||
.../deepin-devicemanager_zh_CN.qm | Bin 33123 -> 33194 bytes
|
||||
.../deepin-devicemanager_zh_CN.ts | 5 +
|
||||
4 files changed, 115 insertions(+), 105 deletions(-)
|
||||
|
||||
diff --git a/deepin-devicemanager/src/DeviceManager/DeviceCpu.cpp b/deepin-devicemanager/src/DeviceManager/DeviceCpu.cpp
|
||||
index bce084f..31b4149 100644
|
||||
--- a/deepin-devicemanager/src/DeviceManager/DeviceCpu.cpp
|
||||
+++ b/deepin-devicemanager/src/DeviceManager/DeviceCpu.cpp
|
||||
@@ -402,7 +402,7 @@ void DeviceCpu::getTrNumber()
|
||||
m_trNumber.insert(124, QObject::tr("One hundred and Twenty-four"));
|
||||
m_trNumber.insert(126, QObject::tr("One hundred and Twenty-six"));
|
||||
m_trNumber.insert(128, QObject::tr("One hundred and Twenty-eight"));
|
||||
-
|
||||
+ m_trNumber.insert(256, QObject::tr("Two hundred and Fifty-six"));
|
||||
}
|
||||
|
||||
|
||||
diff --git a/deepin-devicemanager/translations/deepin-devicemanager.ts b/deepin-devicemanager/translations/deepin-devicemanager.ts
|
||||
index 2730ad4..947eb13 100644
|
||||
--- a/deepin-devicemanager/translations/deepin-devicemanager.ts
|
||||
+++ b/deepin-devicemanager/translations/deepin-devicemanager.ts
|
||||
@@ -27,13 +27,13 @@
|
||||
<name>DetailTreeView</name>
|
||||
<message>
|
||||
<location filename="../src/Widget/DetailTreeView.cpp" line="137"/>
|
||||
- <location filename="../src/Widget/DetailTreeView.cpp" line="339"/>
|
||||
+ <location filename="../src/Widget/DetailTreeView.cpp" line="344"/>
|
||||
<source>More</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/Widget/DetailTreeView.cpp" line="141"/>
|
||||
- <location filename="../src/Widget/DetailTreeView.cpp" line="346"/>
|
||||
+ <location filename="../src/Widget/DetailTreeView.cpp" line="351"/>
|
||||
<source>Collapse</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -285,116 +285,116 @@
|
||||
<context>
|
||||
<name>DeviceCpu</name>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="65"/>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="250"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="66"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="310"/>
|
||||
<source>Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="66"/>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="251"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="67"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="311"/>
|
||||
<source>Vendor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="67"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="68"/>
|
||||
<source>CPU ID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="68"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="69"/>
|
||||
<source>Core ID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="69"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="70"/>
|
||||
<source>Threads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="70"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="71"/>
|
||||
<source>Current Speed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="71"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="72"/>
|
||||
<source>BogoMIPS</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="72"/>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="253"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="73"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="313"/>
|
||||
<source>Architecture</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="73"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="74"/>
|
||||
<source>CPU Family</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="74"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="75"/>
|
||||
<source>Model</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="99"/>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="112"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="100"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="113"/>
|
||||
<source>Processor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="110"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="111"/>
|
||||
<source>Core(s)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="234"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="294"/>
|
||||
<source>Virtualization</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="235"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="295"/>
|
||||
<source>Flags</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="236"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="296"/>
|
||||
<source>Extensions</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="237"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="297"/>
|
||||
<source>L3 Cache</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="238"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="298"/>
|
||||
<source>L2 Cache</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="239"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="299"/>
|
||||
<source>L1i Cache</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="240"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="300"/>
|
||||
<source>L1d Cache</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="241"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="301"/>
|
||||
<source>Stepping</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="252"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="312"/>
|
||||
<source>Speed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="252"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="312"/>
|
||||
<source>Max Speed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -1540,24 +1540,24 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/Page/PageSingleInfo.cpp" line="29"/>
|
||||
- <location filename="../src/Page/PageSingleInfo.cpp" line="149"/>
|
||||
- <location filename="../src/Page/PageSingleInfo.cpp" line="176"/>
|
||||
+ <location filename="../src/Page/PageSingleInfo.cpp" line="156"/>
|
||||
+ <location filename="../src/Page/PageSingleInfo.cpp" line="183"/>
|
||||
<source>Enable</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/Page/PageSingleInfo.cpp" line="147"/>
|
||||
- <location filename="../src/Page/PageSingleInfo.cpp" line="190"/>
|
||||
+ <location filename="../src/Page/PageSingleInfo.cpp" line="154"/>
|
||||
+ <location filename="../src/Page/PageSingleInfo.cpp" line="197"/>
|
||||
<source>Disable</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/Page/PageSingleInfo.cpp" line="179"/>
|
||||
+ <location filename="../src/Page/PageSingleInfo.cpp" line="186"/>
|
||||
<source>Failed to disable the device</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/Page/PageSingleInfo.cpp" line="193"/>
|
||||
+ <location filename="../src/Page/PageSingleInfo.cpp" line="200"/>
|
||||
<source>Failed to enable the device</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -2078,355 +2078,360 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="55"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="56"/>
|
||||
<source>CPU implementer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="56"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="57"/>
|
||||
<source>CPU architecture</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="57"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="58"/>
|
||||
<source>CPU variant</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="58"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="59"/>
|
||||
<source>CPU part</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="59"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="60"/>
|
||||
<source>CPU revision</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="268"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="328"/>
|
||||
<source>One</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="269"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="329"/>
|
||||
<source>Two</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="270"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="330"/>
|
||||
<source>Four</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="271"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="331"/>
|
||||
<source>Six</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="272"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="332"/>
|
||||
<source>Eight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="274"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="334"/>
|
||||
<source>Ten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="275"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="335"/>
|
||||
<source>Twelve</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="276"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="336"/>
|
||||
<source>Fourteen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="277"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="337"/>
|
||||
<source>Sixteen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="278"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="338"/>
|
||||
<source>Eighteen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="280"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="340"/>
|
||||
<source>Twenty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="281"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="341"/>
|
||||
<source>Twenty-two</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="282"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="342"/>
|
||||
<source>Twenty-four</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="283"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="343"/>
|
||||
<source>Twenty-six</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="284"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="344"/>
|
||||
<source>Twenty-eight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="286"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="346"/>
|
||||
<source>Thirty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="287"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="347"/>
|
||||
<source>Thirty-two</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="288"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="348"/>
|
||||
<source>Thirty-four</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="289"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="349"/>
|
||||
<source>Thirty-six</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="290"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="350"/>
|
||||
<source>Thirty-eight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="292"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="352"/>
|
||||
<source>Forty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="293"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="353"/>
|
||||
<source>Forty-two</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="294"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="354"/>
|
||||
<source>Forty-four</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="295"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="355"/>
|
||||
<source>Forty-six</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="296"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="356"/>
|
||||
<source>Forty-eight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="298"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="358"/>
|
||||
<source>Fifty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="299"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="359"/>
|
||||
<source>Fifty-two</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="300"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="360"/>
|
||||
<source>Fifty-four</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="301"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="361"/>
|
||||
<source>Fifty-six</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="302"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="362"/>
|
||||
<source>Fifty-eight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="304"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="364"/>
|
||||
<source>Sixty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="305"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="365"/>
|
||||
<source>Sixty-two</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="306"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="366"/>
|
||||
<source>Sixty-four</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="307"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="367"/>
|
||||
<source>Sixty-six</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="308"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="368"/>
|
||||
<source>Sixty-eight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="310"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="370"/>
|
||||
<source>Seventy</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="311"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="371"/>
|
||||
<source>Seventy-two</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="312"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="372"/>
|
||||
<source>Seventy-four</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="313"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="373"/>
|
||||
<source>Seventy-six</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="314"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="374"/>
|
||||
<source>Seventy-eight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="316"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="376"/>
|
||||
<source>Eighty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="317"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="377"/>
|
||||
<source>Eighty-two</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="318"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="378"/>
|
||||
<source>Eighty-four</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="319"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="379"/>
|
||||
<source>Eighty-six</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="320"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="380"/>
|
||||
<source>Eighty-eight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="322"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="382"/>
|
||||
<source>Ninety</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="323"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="383"/>
|
||||
<source>Ninety-two</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="324"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="384"/>
|
||||
<source>Ninety-four</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="325"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="385"/>
|
||||
<source>Ninety-six</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="326"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="386"/>
|
||||
<source>Ninety-eight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="328"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="388"/>
|
||||
<source>One hundred</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="329"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="389"/>
|
||||
<source>One hundred and Two</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="330"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="390"/>
|
||||
<source>One hundred and four</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="331"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="391"/>
|
||||
<source>One hundred and Six</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="332"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="392"/>
|
||||
<source>One hundred and Eight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="334"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="394"/>
|
||||
<source>One hundred and Ten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="335"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="395"/>
|
||||
<source>One hundred and Twelve</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="336"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="396"/>
|
||||
<source>One hundred and Fourteen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="337"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="397"/>
|
||||
<source>One hundred and Sixteen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="338"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="398"/>
|
||||
<source>One hundred and Eighteen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="340"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="400"/>
|
||||
<source>One hundred and Twenty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="341"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="401"/>
|
||||
<source>One hundred and Twenty-two</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="342"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="402"/>
|
||||
<source>One hundred and Twenty-four</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="343"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="403"/>
|
||||
<source>One hundred and Twenty-six</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/DeviceManager/DeviceCpu.cpp" line="344"/>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="404"/>
|
||||
<source>One hundred and Twenty-eight</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
+ <message>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="405"/>
|
||||
+ <source>Two hundred and Fifty-six</source>
|
||||
+ <translation type="unfinished"></translation>
|
||||
+ </message>
|
||||
<message>
|
||||
<location filename="../src/DeviceManager/DeviceGpu.cpp" line="46"/>
|
||||
<source>GDDR capacity</source>
|
||||
diff --git a/deepin-devicemanager/translations/deepin-devicemanager_zh_CN.qm b/deepin-devicemanager/translations/deepin-devicemanager_zh_CN.qm
|
||||
index b33553414c6fc6156c386f22dbeba3e5cb40c7e5..af83992c22b616f5595cf1a80f4ac5bc577ae6e0 100644
|
||||
GIT binary patch
|
||||
delta 947
|
||||
zcmWlXe@s<n7{|ZwxrcM_xrcKOmtY7L7c{yl0<-uL(;!mXbmKC{4|Bog0{6nb;=NQ0
|
||||
z82tg35-qNoKCr|Vjuo29azU)N1}z2C1?2{e-Hh5QWzA)-Xl7;h^vBt=o%em8=kxtO
|
||||
z-ydI*&K!{5Oc2i;NxUs;CUlV`#583{uJl&K%nG3HI+Po0K*I)D<zrm0Lcf*@guD|W
|
||||
zsatFc6yT-zM}dGB2iNBUMX4D0wi<9&V{wT8H~I0+*)G5zqD0vx{-P)3n)nu3@}F=6
|
||||
zdn=^ZXQDvk0*%T!Vu+SxXZn82zO9o$p3@R30pRmk&dvFNwDXpw%I|>sw<s~D*wG?8
|
||||
z?^^^a%H^!>j1#OSe@wX;q{*0#*3p#!gKwsln4aWidFIodfSM*>da@8G-X(u|{crAC
|
||||
zK<&!I>%&6+x?=zcpO%+9n6`9_eB&;w-J#33Mk3tgFik0);s?sJo|J-_v|@cj^5jv-
|
||||
zRv^Y{)Rt3tT<Pmu1-9N*DEnPt^FzuB*BsE?qnvEJz_1}@Y%l}Z^N;e;qr*V?xblfK
|
||||
z4YcNyuBJ-fJjzmC;vQA2IbxD})f{!)dZwQr26|~qZ4n{Lus7T5Q*4p>(+u55gZAuA
|
||||
z;Y{09<Pt+K*ltfH05xm2KZkPJ>MS+Z#$w8%YRa}MzJ8T{vFF>pcC|OkhBkdgSz3~q
|
||||
zqEan8#h;*Fj9&(FUsLC1e+G8Hr(Wq;;5E(DA-?o6jcTXFzf>06;uzD^E<aD}*7Q4!
|
||||
zUVnvVV_jReYr79H=eF~jr}2M5FKgik*ua3Q?YAreRY9$P&cc2_rycnq%;)p;pq?Yz
|
||||
zsZ4iEJ{!HG=Sv=gmh^H_LK%ijM5)XuvhPcb9l7WMJgYQld?D(n&g|jLteC~g(|XNO
|
||||
zUZhc^H=XJQHd?syz@SWdaotjLEKSBa(`StE+f6`WzVZCJL7?E4@#3LwR=H{%{hsp{
|
||||
zT1S7x<x7p3l;v=xuNgOo?=Y&>`1RNr;O#eYcn{ZS&7@5B%X5(09nQk2SvlOr!p@qt
|
||||
z{+m4SoY@$;2DmHCrYIXw^SSAJjJq^cn5`e~0Crw5JNFK80!nG#@oJL4$o%czA}`);
|
||||
z{{GWtPWng?XnUMKd+Pp)-uT42N9^uMN4I;RvZNwp<FrHJFS)9-EiKR<_PyZur8R_o
|
||||
RX-@~6X{0u3;&|I-$A4hkDB=JB
|
||||
|
||||
delta 844
|
||||
zcmWNPZA?>V6vzM1?d@%E%kAZMk{f)X)&x7<Xp?QQER#3g7Bz!1wQRbzOrU^3anblv
|
||||
z6CjH0!$h1OOu!+_G>CJOWg>~puq{Y87$bgxCFt;rLb8moWxfEJ#+^?m&&hMn^Z);z
|
||||
z|CJ``{xRwEWuoYG%7QTaG+_$SNa>Q#`!cKv0fc*?{PhU<_yKHkJFvSG+DsY{^Y+E0
|
||||
z2C=?!5l1d}165ueU-KG}lZLiGLVzcPi4N|Ut;L;h;y~0-DY8%8q-?p^U6GKYUlsz@
|
||||
zZt1h(DWJ5Cy5)e_MU%3}n{TOovmeOxSX%M{lzS}S{#FjG9<oeszXz0jKq=N-<3-u?
|
||||
z!UXVMP|n!Ia`vpEs5K~xso%PeW~~jW?eg%=Er7aO9?5$H$lWTB&Hl%77O7rY>xd1>
|
||||
zw-2@fb=B0Xn4*Xh${}%)vTc{7syUjmwMyY9bin?)*iXIofcTK6?Ph+Sa%t}^7T{N|
|
||||
zo=pdKK2@&2(gg&sDL14a*vx`5aFhuZ`IUiVL15c9WuVE==L^d4$e%p-gfdm1_=&=5
|
||||
zKpdo#YCzp@yK;gzR=q<BwNm&g!%^Xg+_krif6cx((|Lz~eQeG?*fPRO+w2R2%YfoX
|
||||
z_Qek7Tsp5N+1WwCl)8Mw4!+(=j~!WSO2*XYDW+F;N<CBa7K@9kU*vJ!d|mDNJ_=Mc
|
||||
zP=V7gl}}Q=(@bquXLs!bd`;><@#BDHRDE`Xokb2)ud_$|NTH-kBj!}&JXn|O)Rx#~
|
||||
z$!Qu-@}<ho_nTPxh9PI9l)E(>opmd_fy!S=(@fDy=~_T!QAjJ4%0{VM%aX#kX<7>k
|
||||
zi85S1agIW+97oOXNniaO;pZ;XdDkx@jiP!Z2V_RiO>NYQ&+zZLa<sCZW?-F#E3dCg
|
||||
zP<C>I6dk9*WRGa3>Etx2c8Z=QXGy!~DAVwH`(5*0OTZ4B>+klfoZ5GFoZ88CrEb2&
|
||||
zSR!vzz2Py=>D#;FyslRNC_2yK`Gk56({SrG-!ZB!xAa5R9gIq$N#j$q{JH+`^9d$d
|
||||
gs6Tu#%HT`)FpVV|bFb(-=}rmL?5k$q;@)e<|Mj2@jQ{`u
|
||||
|
||||
diff --git a/deepin-devicemanager/translations/deepin-devicemanager_zh_CN.ts b/deepin-devicemanager/translations/deepin-devicemanager_zh_CN.ts
|
||||
index 9b99cf0..37a4cfe 100644
|
||||
--- a/deepin-devicemanager/translations/deepin-devicemanager_zh_CN.ts
|
||||
+++ b/deepin-devicemanager/translations/deepin-devicemanager_zh_CN.ts
|
||||
@@ -2425,6 +2425,11 @@
|
||||
<source>One hundred and Twenty-eight</source>
|
||||
<translation>一百二十八</translation>
|
||||
</message>
|
||||
+ <message>
|
||||
+ <location filename="../src/DeviceManager/DeviceCpu.cpp" line="405"/>
|
||||
+ <source>Two hundred and Fifty-six</source>
|
||||
+ <translation>二百五十六</translation>
|
||||
+ </message>
|
||||
<message>
|
||||
<location filename="../src/DeviceManager/DeviceGpu.cpp" line="46"/>
|
||||
<source>GDDR capacity</source>
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@ -1,720 +0,0 @@
|
||||
From 4cb65600d76de933733283f08ea6bc98b3a9ce44 Mon Sep 17 00:00:00 2001
|
||||
From: root <root@localhost.localdomain>
|
||||
Date: Thu, 2 Sep 2021 15:15:19 +0800
|
||||
Subject: [PATCH] fix can not distinguish hdd issue
|
||||
|
||||
---
|
||||
.../src/LoadInfo/ThreadPool.cpp | 123 +-----------------
|
||||
.../src/UsbDetect/DetectJob.cpp | 72 ----------
|
||||
.../src/UsbDetect/DetectJob.h | 59 ---------
|
||||
.../src/UsbDetect/DetectThread.cpp | 102 ++++++++++++++-
|
||||
.../src/UsbDetect/DetectThread.h | 18 ++-
|
||||
.../src/UsbDetect/MonitorUsb.cpp | 6 +-
|
||||
.../src/DeviceManager/DeviceBluetooth.cpp | 2 +-
|
||||
deepin-devicemanager/src/LoadInfo/CmdTool.cpp | 110 +++++++++++++---
|
||||
deepin-devicemanager/src/LoadInfo/CmdTool.h | 28 ++++
|
||||
.../src/ThreadPool/ReadFilePool.cpp | 10 +-
|
||||
10 files changed, 248 insertions(+), 282 deletions(-)
|
||||
delete mode 100644 deepin-devicemanager-server/src/UsbDetect/DetectJob.cpp
|
||||
delete mode 100644 deepin-devicemanager-server/src/UsbDetect/DetectJob.h
|
||||
|
||||
diff --git a/deepin-devicemanager-server/src/LoadInfo/ThreadPool.cpp b/deepin-devicemanager-server/src/LoadInfo/ThreadPool.cpp
|
||||
index 73680f8..370482d 100644
|
||||
--- a/deepin-devicemanager-server/src/LoadInfo/ThreadPool.cpp
|
||||
+++ b/deepin-devicemanager-server/src/LoadInfo/ThreadPool.cpp
|
||||
@@ -45,21 +45,6 @@ void ThreadPool::updateDeviceFile()
|
||||
|
||||
void ThreadPool::initCmd()
|
||||
{
|
||||
- // According to Huawei's requirements , Modify the way of judging klu and panguv
|
||||
- // 获取华为KLU、PanguV信息
|
||||
- Cmd cmdDbus;
|
||||
- cmdDbus.cmd = QString("%1 %2%3").arg("gdbus introspect -y -d com.deepin.system.SystemInfo -o /com/deepin/system/SystemInfo -p >").arg(PATH).arg("gdbus.txt");
|
||||
- cmdDbus.file = "gdbus.txt";
|
||||
- cmdDbus.canNotReplace = false;
|
||||
- m_ListCmd.append(cmdDbus);
|
||||
-
|
||||
- // 获取架构信息
|
||||
- Cmd cmdUname;
|
||||
- cmdUname.cmd = QString("%1 %2%3").arg("uname -m > ").arg(PATH).arg("uname_m.txt");
|
||||
- cmdUname.file = "uname_m.txt";
|
||||
- cmdUname.canNotReplace = false;
|
||||
- m_ListCmd.append(cmdUname);
|
||||
-
|
||||
// 添加lshw命令
|
||||
Cmd cmdLshw;
|
||||
cmdLshw.cmd = QString("%1 %2%3").arg("lshw > ").arg(PATH).arg("lshw.txt");
|
||||
@@ -124,70 +109,6 @@ void ThreadPool::initCmd()
|
||||
cmdDmi17.canNotReplace = true;
|
||||
m_ListCmd.append(cmdDmi17);
|
||||
|
||||
- // 添加hwinfo --sound命令
|
||||
- Cmd cmdHwinfoSound;
|
||||
- cmdHwinfoSound.cmd = QString("%1 %2%3").arg("hwinfo --sound > ").arg(PATH).arg("hwinfo_sound.txt");
|
||||
- cmdHwinfoSound.file = "hwinfo_sound.txt";
|
||||
- cmdHwinfoSound.canNotReplace = false;
|
||||
- m_ListCmd.append(cmdHwinfoSound);
|
||||
- m_ListUpdate.append(cmdHwinfoSound);
|
||||
-
|
||||
- // 添加hwinfo --usb命令
|
||||
- Cmd cmdHwinfoUsb;
|
||||
- cmdHwinfoUsb.cmd = QString("%1 %2%3").arg("hwinfo --usb > ").arg(PATH).arg("hwinfo_usb.txt");
|
||||
- cmdHwinfoUsb.file = "hwinfo_usb.txt";
|
||||
- cmdHwinfoUsb.canNotReplace = false;
|
||||
- m_ListCmd.append(cmdHwinfoUsb);
|
||||
- m_ListUpdate.append(cmdHwinfoUsb);
|
||||
-
|
||||
- // 添加hwinfo --network命令
|
||||
- Cmd cmdHwinfoNetwork;
|
||||
- cmdHwinfoNetwork.cmd = QString("%1 %2%3").arg("hwinfo --network > ").arg(PATH).arg("hwinfo_network.txt");
|
||||
- cmdHwinfoNetwork.file = "hwinfo_network.txt";
|
||||
- cmdHwinfoNetwork.canNotReplace = false;
|
||||
- m_ListCmd.append(cmdHwinfoNetwork);
|
||||
- m_ListUpdate.append(cmdHwinfoNetwork);
|
||||
-
|
||||
- // 添加hwinfo --keyboard命令
|
||||
- Cmd cmdHwinfoKeyboard;
|
||||
- cmdHwinfoKeyboard.cmd = QString("%1 %2%3").arg("hwinfo --keyboard > ").arg(PATH).arg("hwinfo_keyboard.txt");
|
||||
- cmdHwinfoKeyboard.file = "hwinfo_keyboard.txt";
|
||||
- cmdHwinfoKeyboard.canNotReplace = false;
|
||||
- m_ListCmd.append(cmdHwinfoKeyboard);
|
||||
- m_ListUpdate.append(cmdHwinfoKeyboard);
|
||||
-
|
||||
- // 添加hwinfo --network命令
|
||||
- Cmd cmdHwinfoCdrom;
|
||||
- cmdHwinfoCdrom.cmd = QString("%1 %2%3").arg("hwinfo --cdrom > ").arg(PATH).arg("hwinfo_cdrom.txt");
|
||||
- cmdHwinfoCdrom.file = "hwinfo_cdrom.txt";
|
||||
- cmdHwinfoCdrom.canNotReplace = false;
|
||||
- m_ListCmd.append(cmdHwinfoCdrom);
|
||||
- m_ListUpdate.append(cmdHwinfoCdrom);
|
||||
-
|
||||
- // 添加hwinfo --disk命令
|
||||
- Cmd cmdHwinfoDisk;
|
||||
- cmdHwinfoDisk.cmd = QString("%1 %2%3").arg("hwinfo --disk > ").arg(PATH).arg("hwinfo_disk.txt");
|
||||
- cmdHwinfoDisk.file = "hwinfo_disk.txt";
|
||||
- cmdHwinfoDisk.canNotReplace = false;
|
||||
- m_ListCmd.append(cmdHwinfoDisk);
|
||||
- m_ListUpdate.append(cmdHwinfoDisk);
|
||||
-
|
||||
- // 添加hwinfo --display命令
|
||||
- Cmd cmdHwinfoDisplay;
|
||||
- cmdHwinfoDisplay.cmd = QString("%1 %2%3").arg("hwinfo --display > ").arg(PATH).arg("hwinfo_display.txt");
|
||||
- cmdHwinfoDisplay.file = "hwinfo_display.txt";
|
||||
- cmdHwinfoDisplay.canNotReplace = true;
|
||||
- m_ListCmd.append(cmdHwinfoDisplay);
|
||||
- m_ListUpdate.append(cmdHwinfoDisplay);
|
||||
-
|
||||
- // 添加hwinfo --mouse命令
|
||||
- Cmd cmdHwinfoMouse;
|
||||
- cmdHwinfoMouse.cmd = QString("%1 %2%3").arg("hwinfo --mouse > ").arg(PATH).arg("hwinfo_mouse.txt");
|
||||
- cmdHwinfoMouse.file = "hwinfo_mouse.txt";
|
||||
- cmdHwinfoMouse.canNotReplace = false;
|
||||
- m_ListCmd.append(cmdHwinfoMouse);
|
||||
- m_ListUpdate.append(cmdHwinfoMouse);
|
||||
-
|
||||
// 添加hwinfo --power命令
|
||||
Cmd cmdUpower;
|
||||
cmdUpower.cmd = QString("%1 %2%3").arg("upower --dump > ").arg(PATH).arg("upower_dump.txt");
|
||||
@@ -268,42 +189,10 @@ void ThreadPool::initCmd()
|
||||
cmdLsMod.canNotReplace = true;
|
||||
m_ListCmd.append(cmdLsMod);
|
||||
|
||||
- // if (info.contains("klu")) {
|
||||
- // Cmd cmdGpuinfo;
|
||||
- // cmdGpuinfo.cmd = "gpuinfo";
|
||||
- // cmdGpuinfo.file = "gpuinfo.txt";
|
||||
- // cmdGpuinfo.canNotReplace = true;
|
||||
- // m_ListCmd.append(cmdGpuinfo);
|
||||
-
|
||||
- // Cmd cmdBootdevice;
|
||||
- // cmdBootdevice.cmd = "cat /proc/bootdevice/product_name";
|
||||
- // cmdBootdevice.file = "bootdevice.txt";
|
||||
- // cmdBootdevice.canNotReplace = false;
|
||||
- // m_ListCmd.append(cmdBootdevice);
|
||||
-
|
||||
- // } else if (info.contains("panguV")) {
|
||||
- // Cmd cmdGpuinfo;
|
||||
- // cmdGpuinfo.cmd = "gpuinfo";
|
||||
- // cmdGpuinfo.file = "gpuinfo.txt";
|
||||
- // cmdGpuinfo.canNotReplace = true;
|
||||
- // m_ListCmd.append(cmdGpuinfo);
|
||||
-
|
||||
- // Cmd cmdBootdevice;
|
||||
- // cmdBootdevice.cmd = "cat /proc/bootdevice/product_name";
|
||||
- // cmdBootdevice.file = "bootdevice.txt";
|
||||
- // cmdBootdevice.canNotReplace = false;
|
||||
- // m_ListCmd.append(cmdBootdevice);
|
||||
-
|
||||
- // Cmd cmdEdidHdmi;
|
||||
- // cmdEdidHdmi.cmd = "hexdump /sys/devices/platform/hisi-drm/drm/card0/card0-HDMI-A-1/edid";
|
||||
- // cmdEdidHdmi.file = "EDID_HDMI.txt";
|
||||
- // cmdEdidHdmi.canNotReplace = false;
|
||||
- // m_ListCmd.append(cmdEdidHdmi);
|
||||
-
|
||||
- // Cmd cmdEdidVGA;
|
||||
- // cmdEdidVGA.cmd = "hexdump /sys/devices/platform/hisi-drm/drm/card0/card0-VGA-1/edid";
|
||||
- // cmdEdidVGA.file = "EDID_VGA.txt";
|
||||
- // cmdEdidVGA.canNotReplace = false;
|
||||
- // m_ListCmd.append(cmdEdidVGA);
|
||||
- // }
|
||||
+ Cmd cmdHwinfo;
|
||||
+ cmdHwinfo.cmd = QString("%1 %2%3").arg("hwinfo --sound --network --keyboard --cdrom --disk --display --mouse --usb > ").arg(PATH).arg("hwinfo.txt");
|
||||
+ cmdHwinfo.file = "hwinfo.txt";
|
||||
+ cmdHwinfo.canNotReplace = false;
|
||||
+ m_ListCmd.append(cmdHwinfo);
|
||||
+ m_ListUpdate.append(cmdHwinfo);
|
||||
}
|
||||
diff --git a/deepin-devicemanager-server/src/UsbDetect/DetectJob.cpp b/deepin-devicemanager-server/src/UsbDetect/DetectJob.cpp
|
||||
deleted file mode 100644
|
||||
index cac00e8..0000000
|
||||
--- a/deepin-devicemanager-server/src/UsbDetect/DetectJob.cpp
|
||||
+++ /dev/null
|
||||
@@ -1,72 +0,0 @@
|
||||
-#include "DetectJob.h"
|
||||
-
|
||||
-#include <unistd.h>
|
||||
-#include <QDateTime>
|
||||
-#include <QDebug>
|
||||
-
|
||||
-#include <arpa/inet.h>
|
||||
-#include <netinet/in.h>
|
||||
-#include <linux/netlink.h>
|
||||
-
|
||||
-DetectJob::DetectJob(QObject *parent)
|
||||
- : QObject(parent)
|
||||
- , m_LaskTime(QDateTime::currentMSecsSinceEpoch())
|
||||
- , m_Elapse(10000)
|
||||
-{
|
||||
-
|
||||
-}
|
||||
-
|
||||
-void DetectJob::working()
|
||||
-{
|
||||
- int sockfd;
|
||||
- struct sockaddr_nl sa;
|
||||
- char buf[4096];
|
||||
- struct iovec iov;
|
||||
- struct msghdr msg;
|
||||
- // int i;
|
||||
- memset(buf, 0, sizeof(buf));
|
||||
- memset(&sa, 0, sizeof(sa));
|
||||
- sa.nl_family = AF_NETLINK;
|
||||
- sa.nl_groups = NETLINK_KOBJECT_UEVENT;
|
||||
- sa.nl_pid = 0;//getpid(); both is ok
|
||||
- memset(&msg, 0, sizeof(msg));
|
||||
- iov.iov_base = static_cast<void *>(buf);
|
||||
- iov.iov_len = sizeof(buf);
|
||||
- msg.msg_name = static_cast<void *>(&sa);
|
||||
- msg.msg_namelen = sizeof(sa);
|
||||
- msg.msg_iov = &iov;
|
||||
- msg.msg_iovlen = 1;
|
||||
-
|
||||
- sockfd = socket(AF_NETLINK/*PF_NETLINK*/, SOCK_RAW, NETLINK_KOBJECT_UEVENT);
|
||||
- if (sockfd == -1)
|
||||
- printf("socket creating failed:%s\n", strerror(errno));
|
||||
- if (bind(sockfd, reinterpret_cast<struct sockaddr *>(&sa), sizeof(sa)) == -1)
|
||||
- printf("bind error:%s\n", strerror(errno));
|
||||
-
|
||||
- while (true) {
|
||||
- // len未使用到,但是,这句话不可删除,否则影响USB插拔时,/tmp/device-info的自动属性
|
||||
- int len = int(recvmsg(sockfd, &msg, 0)); //MSG_WAITALL
|
||||
- int midLen = -1;
|
||||
- QString Buf(buf);
|
||||
- if (Buf.startsWith("add@/devices/pci")) {
|
||||
- midLen = 36;
|
||||
- } else if (Buf.startsWith("remove@/devices/pci")) {
|
||||
- midLen = 39;
|
||||
- }
|
||||
-
|
||||
- // 过滤部分信息
|
||||
- if (midLen == -1) {
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- emit usbChanged();
|
||||
-
|
||||
- memset(buf, 0, sizeof(buf));
|
||||
- usleep(m_Elapse);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-void DetectJob::setUSleepElapse(unsigned int elapse)
|
||||
-{
|
||||
- m_Elapse = elapse;
|
||||
-}
|
||||
diff --git a/deepin-devicemanager-server/src/UsbDetect/DetectJob.h b/deepin-devicemanager-server/src/UsbDetect/DetectJob.h
|
||||
deleted file mode 100644
|
||||
index dc14958..0000000
|
||||
--- a/deepin-devicemanager-server/src/UsbDetect/DetectJob.h
|
||||
+++ /dev/null
|
||||
@@ -1,59 +0,0 @@
|
||||
-/*
|
||||
-* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd.
|
||||
-*
|
||||
-* Author: Jun.Liu <liujuna@uniontech.com>
|
||||
-*
|
||||
-* Maintainer: XiaoMei.Ji <jixiaomei@uniontech.com>
|
||||
-* Maintainer: Jun.Liu <liujuna@uniontech.com>
|
||||
-*
|
||||
-* This program is free software: you can redistribute it and/or modify
|
||||
-* it under the terms of the GNU General Public License as published by
|
||||
-* the Free Software Foundation, either version 3 of the License, or
|
||||
-* any later version.
|
||||
-*
|
||||
-* This program is distributed in the hope that it will be useful,
|
||||
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-* GNU General Public License for more details.
|
||||
-*
|
||||
-* You should have received a copy of the GNU General Public License
|
||||
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-*/
|
||||
-
|
||||
-#ifndef DETECTJOB_H
|
||||
-#define DETECTJOB_H
|
||||
-
|
||||
-#include <QObject>
|
||||
-
|
||||
-/**
|
||||
- * @brief The DetectJob class
|
||||
- */
|
||||
-class DetectJob : public QObject
|
||||
-{
|
||||
- Q_OBJECT
|
||||
-public:
|
||||
- explicit DetectJob(QObject *parent = nullptr);
|
||||
-
|
||||
- /**
|
||||
- * @brief working : main job
|
||||
- */
|
||||
- [[noreturn]]void working();
|
||||
-
|
||||
- /**
|
||||
- * @brief setUSleepElapse : 设置while循环sleep时间
|
||||
- * @param elapse
|
||||
- */
|
||||
- void setUSleepElapse(unsigned int elapse);
|
||||
-
|
||||
-signals:
|
||||
- /**
|
||||
- * @brief usbChanged
|
||||
- */
|
||||
- void usbChanged();
|
||||
-
|
||||
-private:
|
||||
- qint64 m_LaskTime; //<! last update time
|
||||
- unsigned int m_Elapse; //<! while循环中的sleep时间
|
||||
-};
|
||||
-
|
||||
-#endif // DETECTJOB_H
|
||||
diff --git a/deepin-devicemanager-server/src/UsbDetect/DetectThread.cpp b/deepin-devicemanager-server/src/UsbDetect/DetectThread.cpp
|
||||
index 43ee67b..3c69336 100644
|
||||
--- a/deepin-devicemanager-server/src/UsbDetect/DetectThread.cpp
|
||||
+++ b/deepin-devicemanager-server/src/UsbDetect/DetectThread.cpp
|
||||
@@ -1,12 +1,21 @@
|
||||
#include "DetectThread.h"
|
||||
#include "MonitorUsb.h"
|
||||
|
||||
+#include "QDebug"
|
||||
+#include <QProcess>
|
||||
+
|
||||
+#define LEAST_NUM 10
|
||||
+
|
||||
DetectThread::DetectThread(QObject *parent)
|
||||
: QThread(parent)
|
||||
, mp_MonitorUsb(new MonitorUsb())
|
||||
{
|
||||
// 连接槽函数
|
||||
- connect(mp_MonitorUsb, SIGNAL(usbChanged()), this, SIGNAL(usbChanged()), Qt::QueuedConnection);
|
||||
+ connect(mp_MonitorUsb, SIGNAL(usbChanged()), this, SLOT(slotUsbChanged()), Qt::QueuedConnection);
|
||||
+
|
||||
+ QMap<QString,QMap<QString,QString>> usbInfo;
|
||||
+ curHwinfoUsbInfo(usbInfo);
|
||||
+ updateMemUsbInfo(usbInfo);
|
||||
}
|
||||
|
||||
void DetectThread::run()
|
||||
@@ -15,3 +24,94 @@ void DetectThread::run()
|
||||
mp_MonitorUsb->monitor();
|
||||
}
|
||||
}
|
||||
+
|
||||
+void DetectThread::slotUsbChanged()
|
||||
+{
|
||||
+ // 当监听到新的usb时,内核需要加载usb信息,而上层应用需要在内核处理之后获取信息
|
||||
+ // 为了确保缓存信息之前,内核已经处理完毕,先判断内核是否处理完信息,且判断时间不能多于10s
|
||||
+ qint64 begin = QDateTime::currentMSecsSinceEpoch();
|
||||
+ qint64 end = begin;
|
||||
+ while ((end - begin) <= 10000) {
|
||||
+ if(isUsbDevicesChanged())
|
||||
+ break;
|
||||
+ sleep(1);
|
||||
+ end = QDateTime::currentMSecsSinceEpoch();
|
||||
+ }
|
||||
+ qInfo() << " 此次判断插拔是否完成的时间为 ************ " << QDateTime::currentMSecsSinceEpoch() - begin;
|
||||
+ emit usbChanged();
|
||||
+}
|
||||
+
|
||||
+bool DetectThread::isUsbDevicesChanged()
|
||||
+{
|
||||
+ QMap<QString,QMap<QString,QString>> curUsbInfo;
|
||||
+ curHwinfoUsbInfo(curUsbInfo);
|
||||
+
|
||||
+ // 拔出的时候,如果当前的usb设备个数小于m_MapUsbInfo的个数则返回true
|
||||
+ if(curUsbInfo.size() < m_MapUsbInfo.size()){
|
||||
+ updateMemUsbInfo(curUsbInfo);
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ // 数量一样或curUsbInfo的大小大于m_MapUsbInfo的大小,则一个一个的比较
|
||||
+ // 如果curUsbInfo里面的在m_MapUsbInfo里面找不到则说明内核信息还没有处理完
|
||||
+ foreach(const QString& key,curUsbInfo.keys()){
|
||||
+ if(m_MapUsbInfo.find(key) != m_MapUsbInfo.end())
|
||||
+ continue;
|
||||
+ if(curUsbInfo[key]["Hardware Class"] == "disk"
|
||||
+ && curUsbInfo[key].find("Capacity") == curUsbInfo[key].end())
|
||||
+ continue;
|
||||
+ updateMemUsbInfo(curUsbInfo);
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+void DetectThread::updateMemUsbInfo(const QMap<QString,QMap<QString,QString>>& usbInfo)
|
||||
+{
|
||||
+ m_MapUsbInfo.clear();
|
||||
+ m_MapUsbInfo = usbInfo;
|
||||
+}
|
||||
+
|
||||
+void DetectThread::curHwinfoUsbInfo(QMap<QString,QMap<QString,QString>>& usbInfo)
|
||||
+{
|
||||
+ QProcess process;
|
||||
+ process.start("hwinfo --usb");
|
||||
+ process.waitForFinished(-1);
|
||||
+ QString info = process.readAllStandardOutput();
|
||||
+
|
||||
+ QStringList items = info.split("\n\n");
|
||||
+ foreach(const QString& item,items){
|
||||
+ QMap<QString,QString> mapItem;
|
||||
+ if(!getMapInfo(item,mapItem))
|
||||
+ continue;
|
||||
+ usbInfo.insert(mapItem["SysFS BusID"],mapItem);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+bool DetectThread::getMapInfo(const QString& item,QMap<QString,QString>& mapInfo)
|
||||
+{
|
||||
+ QStringList lines = item.split("\n");
|
||||
+ // 行数太少则为无用信息
|
||||
+ if(lines.size() <= LEAST_NUM){
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ foreach(const QString& line,lines){
|
||||
+ QStringList words = line.split(": ");
|
||||
+ if(words.size() != 2)
|
||||
+ continue;
|
||||
+ mapInfo.insert(words[0].trimmed(),words[1].trimmed());
|
||||
+ }
|
||||
+
|
||||
+ // hub为usb接口,可以直接过滤
|
||||
+ if(mapInfo["Hardware Class"] == "hub"){
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ // 没有总线信息的设备可以过滤
|
||||
+ if(mapInfo.find("SysFS BusID") == mapInfo.end()){
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
diff --git a/deepin-devicemanager-server/src/UsbDetect/DetectThread.h b/deepin-devicemanager-server/src/UsbDetect/DetectThread.h
|
||||
index b5fe5a9..f5f5b7c 100644
|
||||
--- a/deepin-devicemanager-server/src/UsbDetect/DetectThread.h
|
||||
+++ b/deepin-devicemanager-server/src/UsbDetect/DetectThread.h
|
||||
@@ -23,6 +23,8 @@
|
||||
#define DETECTTHREAD_H
|
||||
|
||||
#include <QThread>
|
||||
+#include <QMap>
|
||||
+#include <QDateTime>
|
||||
|
||||
class MonitorUsb;
|
||||
|
||||
@@ -46,8 +48,22 @@ signals:
|
||||
*/
|
||||
void usbChanged();
|
||||
|
||||
+private slots:
|
||||
+ /**
|
||||
+ * @brief slotUsbChanged usb发生变化时的曹函数处理
|
||||
+ */
|
||||
+ void slotUsbChanged();
|
||||
+
|
||||
+private:
|
||||
+ // 判断hwinfo --usb信息是否发生变化
|
||||
+ bool isUsbDevicesChanged();
|
||||
+ void updateMemUsbInfo(const QMap<QString,QMap<QString,QString>>& usbInfo);
|
||||
+ void curHwinfoUsbInfo(QMap<QString,QMap<QString,QString>>& usbInfo);
|
||||
+ bool getMapInfo(const QString& item,QMap<QString,QString>& mapInfo);
|
||||
+
|
||||
private:
|
||||
- MonitorUsb *mp_MonitorUsb; //<! udev检测任务
|
||||
+ MonitorUsb *mp_MonitorUsb; //<! udev检测任务
|
||||
+ QMap<QString,QMap<QString,QString>> m_MapUsbInfo; //<! usb信息
|
||||
};
|
||||
|
||||
#endif // DETECTTHREAD_H
|
||||
diff --git a/deepin-devicemanager-server/src/UsbDetect/MonitorUsb.cpp b/deepin-devicemanager-server/src/UsbDetect/MonitorUsb.cpp
|
||||
index 115c9c1..68a8145 100644
|
||||
--- a/deepin-devicemanager-server/src/UsbDetect/MonitorUsb.cpp
|
||||
+++ b/deepin-devicemanager-server/src/UsbDetect/MonitorUsb.cpp
|
||||
@@ -1,5 +1,8 @@
|
||||
#include "MonitorUsb.h"
|
||||
+
|
||||
#include "QDebug"
|
||||
+
|
||||
+
|
||||
MonitorUsb::MonitorUsb()
|
||||
: m_Udev(nullptr)
|
||||
{
|
||||
@@ -51,9 +54,6 @@ void MonitorUsb::monitor()
|
||||
// 只有add和remove事件才会更新缓存信息
|
||||
strcpy(buf, udev_device_get_action(dev));
|
||||
if (0 == strcmp("add", buf) || 0 == strcmp("remove", buf)) {
|
||||
- // 当监听到新的usb时,内核需要加载usb信息,而上层应用需要在内核处理之后获取信息
|
||||
- // 一般情况udev都会在内核处理完成后加载,但是usb2.0的会在正在加载的时候获取,需要等一段时间
|
||||
- sleep(1);
|
||||
emit usbChanged();
|
||||
}
|
||||
|
||||
diff --git a/deepin-devicemanager/src/DeviceManager/DeviceBluetooth.cpp b/deepin-devicemanager/src/DeviceManager/DeviceBluetooth.cpp
|
||||
index d4c937e..04f77cf 100644
|
||||
--- a/deepin-devicemanager/src/DeviceManager/DeviceBluetooth.cpp
|
||||
+++ b/deepin-devicemanager/src/DeviceManager/DeviceBluetooth.cpp
|
||||
@@ -46,7 +46,7 @@ bool DeviceBluetooth::setInfoFromHwinfo(const QMap<QString, QString> &mapInfo)
|
||||
if (vendor.size() < 1)
|
||||
return false;
|
||||
|
||||
- if (!m_Vendor.contains(vendor[0]))
|
||||
+ if (!m_Vendor.isEmpty() && !m_Vendor.contains(vendor[0]))
|
||||
return false;
|
||||
|
||||
// 获取设备基本信息
|
||||
diff --git a/deepin-devicemanager/src/LoadInfo/CmdTool.cpp b/deepin-devicemanager/src/LoadInfo/CmdTool.cpp
|
||||
index 1dbceca..c9b6d7a 100644
|
||||
--- a/deepin-devicemanager/src/LoadInfo/CmdTool.cpp
|
||||
+++ b/deepin-devicemanager/src/LoadInfo/CmdTool.cpp
|
||||
@@ -28,7 +28,64 @@ void CmdTool::addMapInfo(const QString &key, const QMap<QString, QString> &mapIn
|
||||
lstMap.append(mapInfo);
|
||||
m_cmdInfo.insert(key, lstMap);
|
||||
}
|
||||
+}
|
||||
+
|
||||
+void CmdTool::addMouseKeyboardInfoMapInfo(const QString &key, const QMap<QString, QString> &mapInfo)
|
||||
+{
|
||||
+ if (containsInfoInTheMap("Linux Foundation", mapInfo) // 在服务器版本中发现,hwinfo --mouse 和 hwinfo --keyboard获取的信息里面有多余的无用信息,需要过滤
|
||||
+ || containsInfoInTheMap("Elite Remote Control Driver", mapInfo) // 在笔记本中发现了一个多余信息,做特殊处理 Elite Remote Control Driver
|
||||
+ || containsInfoInTheMap("serial console", mapInfo) // 鲲鹏台式机子上发现一条多余信息 Model: "serial console"
|
||||
+ || containsInfoInTheMap("Wacom", mapInfo)) { // 数位板信息被显示成了mouse信息,这里需要做特殊处理(搞不懂数位板为什么不能显示成鼠标)
|
||||
+ return;
|
||||
+ }
|
||||
+ addMapInfo(key, mapInfo);
|
||||
+}
|
||||
+
|
||||
+void CmdTool::addUsbMapInfo(const QString &key, const QMap<QString, QString> &mapInfo)
|
||||
+{
|
||||
+ QList<QMap<QString, QString>>::iterator it = m_cmdInfo["hwinfo_usb"].begin();
|
||||
+ // 有的是有同一个设备有两段信息,我们只需要一个
|
||||
+ // 比如 SysFS BusID: 1-3:1.2 和 SysFS BusID: 1-3:1.0 这个是同一个设备
|
||||
+ // 我们只需要一个
|
||||
+ for (; it != m_cmdInfo["hwinfo_usb"].end(); ++it) {
|
||||
+ QString curBus = (*it)["SysFS BusID"];
|
||||
+ QString newBus = mapInfo["SysFS BusID"];
|
||||
+ curBus.replace(QRegExp("\\.[0-9]{1,2}$"), "");
|
||||
+ newBus.replace(QRegExp("\\.[0-9]{1,2}$"), "");
|
||||
+ if (curBus == newBus) {
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // 这个是用来过滤,没有接入任何设备的usb接口
|
||||
+ if (mapInfo["Model"].contains("Linux Foundation"))
|
||||
+ return;
|
||||
+
|
||||
+ if (mapInfo["Hardware Class"].contains("hub", Qt::CaseInsensitive))
|
||||
+ return;
|
||||
|
||||
+ // 打印机几信息不从hwinfo --usb里面获取,需要过滤
|
||||
+ if (containsInfoInTheMap("Printer", mapInfo) || containsInfoInTheMap("LaserJet", mapInfo))
|
||||
+ return;
|
||||
+
|
||||
+ // 提前过滤掉键盘鼠标
|
||||
+ if (containsInfoInTheMap("mouse", mapInfo) || containsInfoInTheMap("keyboard", mapInfo))
|
||||
+ return;
|
||||
+
|
||||
+ // 这里特殊处理数位板信息,通过hwinfo --mouse可以获取到数位板信息,但是根据需求数位板应该在其它设备里面(虽然这很不合理)
|
||||
+ // 所以这里需要做特殊处理 即 item 里面包含了 Wacom 的 就说明是数位板设备,那就应该添加到其它设备里面
|
||||
+ if (containsInfoInTheMap("Wacom", mapInfo))
|
||||
+ return;
|
||||
+ addMapInfo(key, mapInfo);
|
||||
+}
|
||||
+
|
||||
+bool CmdTool::containsInfoInTheMap(const QString &info, const QMap<QString, QString> &mapInfo)
|
||||
+{
|
||||
+ foreach (const QString &key, mapInfo.keys()) {
|
||||
+ if (mapInfo[key].contains(info, Qt::CaseInsensitive))
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
}
|
||||
|
||||
void CmdTool::getMapInfo(QMap<QString, QString> &mapInfo, cups_dest_t *src)
|
||||
@@ -399,7 +456,6 @@ void CmdTool::loadPrinterInfo()
|
||||
QMap<QString, QString> mapInfo;
|
||||
dest = dests + i;
|
||||
getMapInfo(mapInfo, dest);
|
||||
-
|
||||
// 这里为了和打印机管理保持一致,做出限制
|
||||
if (mapInfo.size() > 10)
|
||||
addMapInfo("printer", mapInfo);
|
||||
@@ -409,34 +465,50 @@ void CmdTool::loadPrinterInfo()
|
||||
|
||||
void CmdTool::loadHwinfoInfo(const QString &key, const QString &debugfile)
|
||||
{
|
||||
- // 获取文件信息
|
||||
+ // 显示屏信息从前台直接获取
|
||||
QString deviceInfo;
|
||||
- if (key == "hwinfo_monitor")
|
||||
+ if (key == "hwinfo_monitor") {
|
||||
getDeviceInfoFromCmd(deviceInfo, "hwinfo --monitor");
|
||||
- else
|
||||
+ QStringList items = deviceInfo.split("\n\n");
|
||||
+ foreach (const QString &item, items) {
|
||||
+ if (item.isEmpty())
|
||||
+ continue;
|
||||
+ QMap<QString, QString> mapInfo;
|
||||
+ getMapInfoFromHwinfo(item, mapInfo);
|
||||
+ addMapInfo(key, mapInfo);
|
||||
+ }
|
||||
+ } else { // 处理其它信息 mouse sound keyboard usb display cdrom disk
|
||||
getDeviceInfo(deviceInfo, debugfile);
|
||||
+ getMulHwinfoInfo(deviceInfo);
|
||||
+ }
|
||||
+}
|
||||
|
||||
- QStringList items = deviceInfo.split("\n\n");
|
||||
+void CmdTool::getMulHwinfoInfo(const QString &info)
|
||||
+{
|
||||
+ QStringList items = info.split("\n\n");
|
||||
foreach (const QString &item, items) {
|
||||
if (item.isEmpty())
|
||||
continue;
|
||||
-
|
||||
QMap<QString, QString> mapInfo;
|
||||
getMapInfoFromHwinfo(item, mapInfo);
|
||||
-
|
||||
- // hwinfo --usb 里面有很多的无用信息,需要特殊处理
|
||||
- if (key == "hwinfo_usb") {
|
||||
- loadHwinfoUsbInfo(item, mapInfo);
|
||||
- } else if (key == "hwinfo_mouse" || key == "hwinfo_keyboard") {
|
||||
- if (!item.contains("Linux Foundation") && // 在服务器版本中发现,hwinfo --mouse 和 hwinfo --keyboard获取的信息里面有多余的无用信息,需要过滤
|
||||
- !item.contains("Elite Remote Control Driver") && // 在笔记本中发现了一个多余信息,做特殊处理 Elite Remote Control Driver
|
||||
- !item.contains("Model: \"serial console\"") && // 鲲鹏台式机子上发现一条多余信息 Model: "serial console"
|
||||
- !item.contains("Wacom", Qt::CaseInsensitive)) { // 数位板信息被显示成了mouse信息,这里需要做特殊处理(搞不懂数位板为什么不能显示成鼠标)
|
||||
-
|
||||
- addMapInfo(key, mapInfo);
|
||||
- }
|
||||
+ if (mapInfo["Hardware Class"] == "sound") {
|
||||
+ addMapInfo("hwinfo_sound", mapInfo);
|
||||
+ } else if (mapInfo["Hardware Class"] == "network interface") {
|
||||
+ addMapInfo("hwinfo_network", mapInfo);
|
||||
+ } else if (mapInfo["Hardware Class"] == "keyboard") {
|
||||
+ addMouseKeyboardInfoMapInfo("hwinfo_keyboard", mapInfo);
|
||||
+ } else if (mapInfo["Hardware Class"] == "mouse") {
|
||||
+ addMouseKeyboardInfoMapInfo("hwinfo_mouse", mapInfo);
|
||||
+ } else if (mapInfo["Hardware Class"] == "cdrom") {
|
||||
+ addMapInfo("hwinfo_cdrom", mapInfo);
|
||||
+ } else if (mapInfo["Hardware Class"] == "disk") {
|
||||
+ addMapInfo("hwinfo_disk", mapInfo);
|
||||
+ } else if (mapInfo["Hardware Class"] == "graphics card") {
|
||||
+ if (mapInfo["Device"].contains("Graphics Processing Unit"))
|
||||
+ continue;
|
||||
+ addMapInfo("hwinfo_display", mapInfo);
|
||||
} else {
|
||||
- addMapInfo(key, mapInfo);
|
||||
+ addUsbMapInfo("hwinfo_usb", mapInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/deepin-devicemanager/src/LoadInfo/CmdTool.h b/deepin-devicemanager/src/LoadInfo/CmdTool.h
|
||||
index c707762..ff9286f 100644
|
||||
--- a/deepin-devicemanager/src/LoadInfo/CmdTool.h
|
||||
+++ b/deepin-devicemanager/src/LoadInfo/CmdTool.h
|
||||
@@ -139,6 +139,12 @@ private:
|
||||
*/
|
||||
void loadHwinfoInfo(const QString &key, const QString &debugfile);
|
||||
|
||||
+ /**
|
||||
+ * @brief getMulHwinfoInfo : 解析 hwinfo --sound --network --keyboard --cdrom --disk --display --mouse --usb
|
||||
+ * @param mapLstMap
|
||||
+ */
|
||||
+ void getMulHwinfoInfo(const QString &info);
|
||||
+
|
||||
/**
|
||||
* @brief loadHwinfoUsbInfo
|
||||
* @param item
|
||||
@@ -319,6 +325,28 @@ private:
|
||||
*/
|
||||
void addMapInfo(const QString &key, const QMap<QString, QString> &mapInfo);
|
||||
|
||||
+ /**
|
||||
+ * @brief addMouseKeyboardInfoMapInfo : 添加map信息
|
||||
+ * @param key : 与命令对应的关键字
|
||||
+ * @param mapInfo : 解析得到的设备信息map
|
||||
+ */
|
||||
+ void addMouseKeyboardInfoMapInfo(const QString &key, const QMap<QString, QString> &mapInfo);
|
||||
+
|
||||
+ /**
|
||||
+ * @brief addUsbMapInfo
|
||||
+ * @param key
|
||||
+ * @param mapInfo
|
||||
+ */
|
||||
+ void addUsbMapInfo(const QString &key, const QMap<QString, QString> &mapInfo);
|
||||
+
|
||||
+ /**
|
||||
+ * @brief containsInfoInTheMap 判断一个map里面有一个str
|
||||
+ * @param info
|
||||
+ * @param mapInfo
|
||||
+ * @return
|
||||
+ */
|
||||
+ bool containsInfoInTheMap(const QString &info, const QMap<QString, QString> &mapInfo);
|
||||
+
|
||||
/**
|
||||
* @brief getMapInfo:解析打印机cups第三方库获取的信息
|
||||
* @param mapInfo:解析得到的map信息
|
||||
diff --git a/deepin-devicemanager/src/ThreadPool/ReadFilePool.cpp b/deepin-devicemanager/src/ThreadPool/ReadFilePool.cpp
|
||||
index 135d471..b9da564 100644
|
||||
--- a/deepin-devicemanager/src/ThreadPool/ReadFilePool.cpp
|
||||
+++ b/deepin-devicemanager/src/ThreadPool/ReadFilePool.cpp
|
||||
@@ -85,15 +85,7 @@ void ReadFilePool::initCmd()
|
||||
m_CmdList.append({"dr_config", "dr_config.txt", ""});
|
||||
|
||||
m_CmdList.append({ "hwinfo_monitor", "hwinfo_monitor.txt", tr("Loading CD-ROM Info...")});
|
||||
- m_CmdList.append({ "hwinfo_sound", "hwinfo_sound.txt", ""});
|
||||
- m_CmdList.append({ "hwinfo_usb", "hwinfo_usb.txt", ""});
|
||||
- m_CmdList.append({ "hwinfo_network", "hwinfo_network.txt", ""});
|
||||
- m_CmdList.append({ "hwinfo_keyboard", "hwinfo_keyboard.txt", tr("Loading Bluetooth Device Info...")});
|
||||
- m_CmdList.append({ "hwinfo_cdrom", "hwinfo_cdrom.txt", tr("Loading Image Devices Info...")});
|
||||
- // 注意:这里一定要用 sudo hwinfo --disk,因为很多机器只有加上sudo 才能获取硬盘的大小
|
||||
- m_CmdList.append({ "hwinfo_disk", "hwinfo_disk.txt", tr("Loading Keyboard Info...")});
|
||||
- m_CmdList.append({ "hwinfo_display", "hwinfo_display.txt", ""});
|
||||
- m_CmdList.append({ "hwinfo_mouse", "hwinfo_mouse.txt", ""});
|
||||
+ m_CmdList.append({ "hwinfo", "hwinfo.txt", ""});
|
||||
|
||||
|
||||
m_CmdList.append({ "upower", "upower_dump.txt", ""});
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
From 9a5c0031d756fe7329de0fa268ede1a8fb993772 Mon Sep 17 00:00:00 2001
|
||||
From: loong ci <loong_c@yeah.net>
|
||||
Date: Fri, 22 Jul 2022 08:57:06 +0800
|
||||
Subject: [PATCH] fix function virtual
|
||||
|
||||
---
|
||||
deepin-devicemanager/tests/src/ThreadPool/ut_readfilepool.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/deepin-devicemanager/tests/src/ThreadPool/ut_readfilepool.cpp b/deepin-devicemanager/tests/src/ThreadPool/ut_readfilepool.cpp
|
||||
index 6928820..7b1fc61 100644
|
||||
--- a/deepin-devicemanager/tests/src/ThreadPool/ut_readfilepool.cpp
|
||||
+++ b/deepin-devicemanager/tests/src/ThreadPool/ut_readfilepool.cpp
|
||||
@@ -70,6 +70,6 @@ void ut_ThreadPool_start()
|
||||
TEST_F(ReadFilePool_UT, ReadFilePool_UT_readAllFile)
|
||||
{
|
||||
Stub stub;
|
||||
- stub.set(ADDR(QThreadPool, start), ut_ThreadPool_start);
|
||||
+ stub.set((void (QThreadPool::*)(QRunnable *, int))ADDR(QThreadPool, start), ut_ThreadPool_start);
|
||||
m_readFilePool->readAllFile();
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
|
||||
Binary file not shown.
@ -4,15 +4,16 @@
|
||||
%endif
|
||||
|
||||
Name: deepin-devicemanager
|
||||
Version: 5.6.9
|
||||
Version: 5.6.34
|
||||
Release: %{specrelease}
|
||||
Summary: Device Manager is a handy tool for viewing hardware information and managing the devices
|
||||
License: GPLv3+
|
||||
URL: https://github.com/linuxdeepin/deepin-devicemanager
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Patch9000: 9000-fix-show-256-core-cpuinfo-issue.patch
|
||||
Patch9001: 9001-fix-can-not-distinguish-hdd-issue.patch
|
||||
Patch9002: 9002-fix-function-virtual.patch
|
||||
Patch0: 0001-feat-rewrite-loadDeviceInfo-updateDeviceInfo.patch
|
||||
#Patch9000: 9000-fix-show-256-core-cpuinfo-issue.patch
|
||||
#Patch9001: 9001-fix-can-not-distinguish-hdd-issue.patch
|
||||
#Patch9002: 9002-fix-function-virtual.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake3
|
||||
@ -47,9 +48,10 @@ Requires: util-linux
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
git apply %{PATCH9000}
|
||||
git apply %{PATCH9001}
|
||||
git apply %{PATCH9002}
|
||||
%patch0 -p1
|
||||
#git apply %{PATCH9000}
|
||||
#git apply %{PATCH9001}
|
||||
#git apply %{PATCH9002}
|
||||
|
||||
%build
|
||||
# help find (and prefer) qt5 utilities, e.g. qmake, lrelease
|
||||
@ -81,6 +83,9 @@ systemctl enable deepin-devicemanager-server.service
|
||||
/etc/dbus-1/system.d/com.deepin.devicemanager.conf
|
||||
|
||||
%changelog
|
||||
* Fri Mar 31 2023 liweiganga <liweiganga@uniontech.com> - 5.6.34-1
|
||||
- update: update to 5.6.34
|
||||
|
||||
* Mon Jul 18 2022 konglidong <konglidong@uniontech.com> 5.6.9-1
|
||||
- update to 5.6.9
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user