add battery
This commit is contained in:
@@ -226,6 +226,12 @@ void JsonObject::setLockScreenTimeout(const QString& str)
|
||||
setJsonString("general", "lockscreen", str.toStdString().c_str());
|
||||
}
|
||||
|
||||
QString JsonObject::storageAlarmSize()
|
||||
{
|
||||
char* str = getJsonString("storagepolicy", "mininum");
|
||||
return QString(str);
|
||||
}
|
||||
|
||||
bool JsonObject::loadcfg()
|
||||
{
|
||||
if (m_bLoaded)
|
||||
@@ -233,7 +239,7 @@ bool JsonObject::loadcfg()
|
||||
std::ifstream inFile(strProductFileName);
|
||||
if (!inFile.is_open())
|
||||
{
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
std::stringstream ss;
|
||||
ss << inFile.rdbuf();
|
||||
@@ -257,7 +263,7 @@ bool JsonObject::savecfg()
|
||||
std::ofstream outFile(strProductFileName);
|
||||
if (!outFile.is_open())
|
||||
{
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
char* strJsonData = cJSON_Print((cJSON*)json_root);
|
||||
|
||||
Reference in New Issue
Block a user