style: 修改代码风格
修改代码风格 Log: Task: https://pms.uniontech.com/task-view-145329.html Influence: 代码更清晰 Change-Id: I01c878350beb4a2b53a4c4cf0385c503f1174df6
This commit is contained in:
@ -23,18 +23,19 @@
|
||||
#include "settings.h"
|
||||
#include "gsetting.h"
|
||||
|
||||
#include <DConfig>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <DConfig>
|
||||
|
||||
DCORE_USE_NAMESPACE
|
||||
|
||||
StartManagerSettings::StartManagerSettings(QObject *parent)
|
||||
: QObject (parent)
|
||||
, launchConfig(Settings::ConfigPtr(configLauncher))
|
||||
, startConfig(Settings::ConfigPtr(configStartdde))
|
||||
, xsettingsConfig(Settings::ConfigPtr(configXsettings))
|
||||
, m_launchConfig(Settings::ConfigPtr(configLauncher))
|
||||
, m_startConfig(Settings::ConfigPtr(configStartdde))
|
||||
, m_xsettingsConfig(Settings::ConfigPtr(configXsettings))
|
||||
{
|
||||
|
||||
}
|
||||
@ -42,10 +43,10 @@ StartManagerSettings::StartManagerSettings(QObject *parent)
|
||||
QVector<QString> StartManagerSettings::getUseProxyApps()
|
||||
{
|
||||
QVector<QString> ret;
|
||||
if (!launchConfig)
|
||||
if (!m_launchConfig)
|
||||
return ret;
|
||||
|
||||
QList<QVariant> apps = launchConfig->value(keyAppsUseProxy).toList();
|
||||
QList<QVariant> apps = m_launchConfig->value(keyAppsUseProxy).toList();
|
||||
for (auto app : apps) {
|
||||
ret.push_back(app.toString());
|
||||
}
|
||||
@ -56,10 +57,10 @@ QVector<QString> StartManagerSettings::getUseProxyApps()
|
||||
QVector<QString> StartManagerSettings::getDisableScalingApps()
|
||||
{
|
||||
QVector<QString> ret;
|
||||
if (!launchConfig)
|
||||
if (!m_launchConfig)
|
||||
return ret;
|
||||
|
||||
QList<QVariant> apps = launchConfig->value(keyAppsDisableScaling).toList();
|
||||
QList<QVariant> apps = m_launchConfig->value(keyAppsDisableScaling).toList();
|
||||
for (auto app : apps) {
|
||||
ret.push_back(app.toString());
|
||||
}
|
||||
@ -70,8 +71,8 @@ QVector<QString> StartManagerSettings::getDisableScalingApps()
|
||||
bool StartManagerSettings::getMemCheckerEnabled()
|
||||
{
|
||||
bool ret = false;
|
||||
if (startConfig) {
|
||||
ret = startConfig->value(keyMemCheckerEnabled).toBool();
|
||||
if (m_startConfig) {
|
||||
ret = m_startConfig->value(keyMemCheckerEnabled).toBool();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -79,8 +80,8 @@ bool StartManagerSettings::getMemCheckerEnabled()
|
||||
double StartManagerSettings::getScaleFactor()
|
||||
{
|
||||
double ret = 0;
|
||||
if (xsettingsConfig) {
|
||||
xsettingsConfig->value(keyScaleFactor).toDouble();
|
||||
if (m_xsettingsConfig) {
|
||||
m_xsettingsConfig->value(keyScaleFactor).toDouble();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -65,9 +65,9 @@ private:
|
||||
StartManagerSettings(const StartManagerSettings &);
|
||||
StartManagerSettings& operator= (const StartManagerSettings &);
|
||||
|
||||
DConfig *launchConfig;
|
||||
DConfig *startConfig;
|
||||
DConfig *xsettingsConfig;
|
||||
DConfig *m_launchConfig;
|
||||
DConfig *m_startConfig;
|
||||
DConfig *m_xsettingsConfig;
|
||||
};
|
||||
|
||||
#endif // STARTMANAGERSETTINGS_H
|
||||
|
Reference in New Issue
Block a user