update// implemented dump method to each datastoretype

This commit is contained in:
Strider
2020-05-17 14:12:27 +02:00
parent 4f584ac86e
commit d4bf7a83c8
14 changed files with 183 additions and 1 deletions

View File

@@ -32,6 +32,17 @@ ChatItem ChatDataStore::getData(QString key)
QString ChatDataStore::dump()
{
json chats;
chats["count"] = this->data.size();
json j = {};
for (auto &c: this->data)
{
j.push_back(c.second.toJson());
}
chats["chatitems"] = j;
std::string dump = chats.dump(4);
qDebug() << dump.c_str();
return "";
}