Version
| 50 | |
| 51 | // Version |
| 52 | static VersionPtr parseCommonVersion(const QString &uid, const QJsonObject &obj) |
| 53 | { |
| 54 | VersionPtr version = std::make_shared<Version>(uid, requireString(obj, "version")); |
| 55 | version->setTime(QDateTime::fromString(requireString(obj, "releaseTime"), Qt::ISODate).toMSecsSinceEpoch() / 1000); |
| 56 | version->setType(ensureString(obj, "type", QString())); |
| 57 | version->setRecommended(ensureBoolean(obj, QString("recommended"), false)); |
| 58 | version->setVolatile(ensureBoolean(obj, QString("volatile"), false)); |
| 59 | RequireSet requires, conflicts; |
| 60 | parseRequires(obj, &requires, "requires"); |
| 61 | parseRequires(obj, &conflicts, "conflicts"); |
| 62 | version->setRequires(requires, conflicts); |
| 63 | return version; |
| 64 | } |
| 65 | |
| 66 | static std::shared_ptr<Version> parseVersionInternal(const QJsonObject &obj) |
| 67 | { |
no test coverage detected