switch back to json lohman - qtjson in new branch for more testing
This commit is contained in:
@@ -59,16 +59,15 @@ void ChatDataStore::setPassword(QString password)
|
||||
|
||||
QString ChatDataStore::dump()
|
||||
{
|
||||
QJsonObject chats;
|
||||
chats["count"] = (qint64)this->data.size();
|
||||
QJsonArray j;
|
||||
json chats;
|
||||
chats["count"] = this->data.size();
|
||||
json j = {};
|
||||
for (auto &c: this->data)
|
||||
{
|
||||
j.push_back(c.second.toJson());
|
||||
}
|
||||
chats["chatitems"] = j;
|
||||
QJsonDocument jd_chats = QJsonDocument(chats);
|
||||
return QLatin1String(jd_chats.toJson(QJsonDocument::Compact));
|
||||
return QString::fromStdString(chats.dump());
|
||||
}
|
||||
|
||||
std::map<QString, ChatItem> ChatDataStore::getAllRawChatItems()
|
||||
|
||||
Reference in New Issue
Block a user