Skip to content

Commit 37fd916

Browse files
GongHeng2017deepin-bot[bot]
authored andcommitted
Fix: [GPU] GPU info not show.
-- Some special platform, GPU info not show. -- Pre cache the GPU info. pick from: beb3ba1 Log: fix issue Bug: https://pms.uniontech.com/bug-view-340131.html
1 parent d080513 commit 37fd916

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

deepin-devicemanager/src/Page/MainWindow.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -477,19 +477,6 @@ void MainWindow::initWindowTitle()
477477
}
478478
});
479479
titlebar()->addWidget(mp_ButtonBox);
480-
#ifdef DTKCORE_CLASS_DConfigFile
481-
//需要查询是否支持特殊机型静音恢复,例如hw机型
482-
DConfig *dconfig = DConfig::create("org.deepin.devicemanager","org.deepin.devicemanager");
483-
//需要判断Dconfig文件是否合法
484-
if(dconfig && dconfig->isValid() && dconfig->keyList().contains("specialComType")){
485-
Common::specialComType = dconfig->value("specialComType").toInt();
486-
}
487-
qCInfo(appLog) << "Common::specialComType value is:" << Common::specialComType;
488-
if (dconfig && dconfig->isValid() && dconfig->keyList().contains("TomlFilesName")) {
489-
QString tomlFilesName = dconfig->value("TomlFilesName").toString();
490-
Common::tomlFilesNameSet(tomlFilesName);
491-
}
492-
#endif
493480
// 特殊处理
494481
if (!Common::boardVendorType().isEmpty())
495482
mp_ButtonBox->hide();

deepin-devicemanager/src/main.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "SingleDeviceManager.h"
1515
#include "DDLog.h"
1616
#include "commontools.h"
17+
#include "commonfunction.h"
1718

1819
#include <DApplication>
1920
#include <DWidgetUtil>
@@ -129,6 +130,27 @@ int main(int argc, char *argv[])
129130
app.setWindowIcon(appIcon);
130131
}
131132

133+
#ifdef DTKCORE_CLASS_DConfigFile
134+
//需要查询是否支持特殊机型静音恢复,例如hw机型
135+
DConfig *dconfig = DConfig::create("org.deepin.devicemanager","org.deepin.devicemanager");
136+
//需要判断Dconfig文件是否合法
137+
if(dconfig && dconfig->isValid() && dconfig->keyList().contains("specialComType")){
138+
Common::specialComType = dconfig->value("specialComType").toInt();
139+
}
140+
qCInfo(appLog) << "Common::specialComType value is:" << Common::specialComType;
141+
142+
if (dconfig && dconfig->isValid() && dconfig->keyList().contains("TomlFilesName")) {
143+
QString tomlFilesName = dconfig->value("TomlFilesName").toString();
144+
Common::tomlFilesNameSet(tomlFilesName);
145+
}
146+
147+
// 特殊机型,提前缓存GPU信息
148+
if (Common::specialComType == Common::kCustomType) {
149+
CommonTools::preGenerateGpuInfo();
150+
}
151+
152+
#endif
153+
132154
QDBusConnection dbus = QDBusConnection::sessionBus();
133155
qCDebug(appLog) << "Registering DBus service...";
134156
if (dbus.registerService("com.deepin.DeviceManagerNotify")) {

0 commit comments

Comments
 (0)