Update and fix JSON writer (#183)

* Fixing the check of createKey in handleConfigSetCommand

* Update schema-config.json

* add overwrite option to configset command

* add overwrite option to setConfig function

* add overwrite option to setConfig function
This commit is contained in:
Paulchen-Panther
2016-08-18 21:11:21 +02:00
committed by redPanther
parent e46d392ed1
commit b9ad2977de
5 changed files with 11 additions and 5 deletions

View File

@@ -268,7 +268,7 @@ QString JsonConnection::getConfig(std::string type)
return QString();
}
void JsonConnection::setConfig(const std::string &jsonString, bool create)
void JsonConnection::setConfig(const std::string &jsonString, bool create, bool overwrite)
{
// create command
Json::Value command;
@@ -276,6 +276,7 @@ void JsonConnection::setConfig(const std::string &jsonString, bool create)
command["subcommand"] = "setconfig";
command["create"] = create;
command["overwrite"] = overwrite;
Json::Value & config = command["config"];
if (jsonString.size() > 0)
{