| 64 | } |
| 65 | |
| 66 | bool StringToFile(const QString &text, const QString &targetpath) |
| 67 | { |
| 68 | bool override = false; |
| 69 | { |
| 70 | QFileInfo info(targetpath); |
| 71 | override = info.exists(); |
| 72 | if (!override && !info.dir().exists()) |
| 73 | info.dir().mkpath(info.dir().path()); |
| 74 | } |
| 75 | QSaveFile f{ targetpath }; |
| 76 | f.open(QIODevice::WriteOnly); |
| 77 | f.write(text.toUtf8()); |
| 78 | f.commit(); |
| 79 | return override; |
| 80 | } |
| 81 | QString JsonToString(const QJsonObject &json, QJsonDocument::JsonFormat format) |
| 82 | { |
| 83 | QJsonDocument doc; |
no test coverage detected