| 38 | } |
| 39 | |
| 40 | QJsonObject parseFile(const QString& path) |
| 41 | { |
| 42 | QFile file(path); |
| 43 | if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { |
| 44 | qCWarning(CMAKE) << "failed to read json file" << path << file.errorString(); |
| 45 | return {}; |
| 46 | } |
| 47 | QJsonParseError error; |
| 48 | const auto document = QJsonDocument::fromJson(file.readAll(), &error); |
| 49 | if (error.error) { |
| 50 | qCWarning(CMAKE) << "failed to parse json file" << path << error.errorString() << error.offset; |
| 51 | return {}; |
| 52 | } |
| 53 | return document.object(); |
| 54 | } |
| 55 | |
| 56 | bool isKDevelopClientResponse(const QJsonObject& indexObject) |
| 57 | { |
no test coverage detected