File tree Expand file tree Collapse file tree 2 files changed +22
-13
lines changed
Expand file tree Collapse file tree 2 files changed +22
-13
lines changed Original file line number Diff line number Diff 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 ();
Original file line number Diff line number Diff line change 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" )) {
You can’t perform that action at this time.
0 commit comments