| 8 | Q_OBJECT |
| 9 | |
| 10 | static QJsonDocument readJson(const QString path) |
| 11 | { |
| 12 | QFile jsonFile(path); |
| 13 | jsonFile.open(QIODevice::ReadOnly); |
| 14 | auto data = jsonFile.readAll(); |
| 15 | jsonFile.close(); |
| 16 | return QJsonDocument::fromJson(data); |
| 17 | } |
| 18 | static void writeJson(const char *file, QJsonDocument doc) |
| 19 | { |
| 20 | QFile jsonFile(file); |