| 142 | } |
| 143 | |
| 144 | VersionFilePtr parseBinaryJsonFile(const QFileInfo &fileInfo) |
| 145 | { |
| 146 | QFile file(fileInfo.absoluteFilePath()); |
| 147 | if (!file.open(QFile::ReadOnly)) |
| 148 | { |
| 149 | auto errorStr = QObject::tr("Unable to open the version file %1: %2.").arg(fileInfo.fileName(), file.errorString()); |
| 150 | return createErrorVersionFile(fileInfo.completeBaseName(), fileInfo.absoluteFilePath(), errorStr); |
| 151 | } |
| 152 | QJsonDocument doc = QJsonDocument::fromBinaryData(file.readAll()); |
| 153 | file.close(); |
| 154 | if (doc.isNull()) |
| 155 | { |
| 156 | file.remove(); |
| 157 | throw JSONValidationError(QObject::tr("Unable to process the version file %1.").arg(fileInfo.fileName())); |
| 158 | } |
| 159 | return guardedParseJson(doc, fileInfo.completeBaseName(), fileInfo.absoluteFilePath(), false); |
| 160 | } |
| 161 | |
| 162 | void removeLwjglFromPatch(VersionFilePtr patch) |
| 163 | { |
nothing calls this directly
no test coverage detected