File tree Expand file tree Collapse file tree
deepin-devicemanager/src/DeviceManager Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010#include " DDLog.h"
1111
1212#include < DApplication>
13+ #include < DConfig>
1314
1415// Qt库文件
1516#include < QLoggingCategory>
2223
2324DWIDGET_USE_NAMESPACE
2425using namespace DDLog ;
26+ DCORE_USE_NAMESPACE
2527
2628DeviceMonitor::DeviceMonitor ()
2729 : DeviceBaseInfo()
@@ -409,12 +411,19 @@ void DeviceMonitor::loadOtherDeviceInfo()
409411 }
410412 }
411413 }
412- addOtherDeviceInfo (" Primary Monitor" , m_MainScreen);
413- if (Common::isShowScreenSize ())
414- addOtherDeviceInfo (" Size" , m_ScreenSize);
415- addOtherDeviceInfo (" Serial Number" , m_SerialNumber);
416- // addOtherDeviceInfo("Product Date", m_ProductionWeek);
417-
414+ addOtherDeviceInfo ((" Primary Monitor" ), m_MainScreen);
415+ bool showScreenSize { true };
416+
417+ #ifdef DTKCORE_CLASS_DConfigFile
418+ DConfig *dconfig = DConfig::create (" org.deepin.devicemanager" ," org.deepin.devicemanager" );
419+ if (dconfig && dconfig->isValid () && dconfig->keyList ().contains (" showScreenSize" )){
420+ showScreenSize = dconfig->value (" showScreenSize" ).toBool ();
421+ }
422+ #endif
423+ if (showScreenSize)
424+ addOtherDeviceInfo ((" Size" ), m_ScreenSize);
425+ addOtherDeviceInfo ((" Serial Number" ), m_SerialNumber);
426+ // addOtherDeviceInfo(("Product Date"), m_ProductionWeek);
418427 mapInfoToList ();
419428 qCDebug (appLog) << " Other device info loaded" ;
420429}
You can’t perform that action at this time.
0 commit comments