添加了手动生成csv功能,防止软件崩溃,无法生成记录
This commit is contained in:
+19
-3
@@ -63,7 +63,7 @@ void Config::loadJson(const QString& jsonFilename)
|
||||
*/
|
||||
|
||||
|
||||
qDebug() << ConfigJson;
|
||||
//qDebug() << ConfigJson;
|
||||
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ void Config::setHeartBeat(QVariant state,QVariant frq)
|
||||
|
||||
void Config::getMapType(QVariant *type)
|
||||
{
|
||||
QJsonObject obj = getJsonObject("GlobalSetting");
|
||||
QJsonObject obj = getJsonObject("Map");
|
||||
|
||||
*type = obj.value("MapType").toString();
|
||||
}
|
||||
@@ -239,5 +239,21 @@ void Config::setMapType(QVariant type)
|
||||
|
||||
obj["MapType"] = type.toString();
|
||||
|
||||
setJsonObject("GlobalSetting",obj);
|
||||
setJsonObject("Map",obj);
|
||||
}
|
||||
|
||||
void Config::getBeep(QVariant *value)
|
||||
{
|
||||
QJsonObject obj = getJsonObject("Warnning");
|
||||
|
||||
*value = obj.value("Beep").toBool();
|
||||
}
|
||||
|
||||
void Config::setBeep(QVariant value)
|
||||
{
|
||||
QJsonObject obj;
|
||||
|
||||
obj["Beep"] = value.toBool();
|
||||
|
||||
setJsonObject("Warnning",obj);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user