From 0060b506257b906d40ef53d1e23404dba76afcee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Fri, 17 Mar 2017 01:48:54 +0100 Subject: NOISSUE simplify. --- api/logic/meta/Index.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'api/logic/meta/Index.h') diff --git a/api/logic/meta/Index.h b/api/logic/meta/Index.h index 16e95d5a..37341656 100644 --- a/api/logic/meta/Index.h +++ b/api/logic/meta/Index.h @@ -27,6 +27,7 @@ class Task; namespace Meta { using VersionListPtr = std::shared_ptr; +using VersionPtr = std::shared_ptr; class MULTIMC_LOGIC_EXPORT Index : public QAbstractListModel, public BaseEntity { @@ -51,17 +52,21 @@ public: std::unique_ptr localUpdateTask() override; QString localFilename() const override { return "index.json"; } - QJsonObject serialized() const override; // queries + VersionListPtr get(const QString &uid); + VersionPtr get(const QString &uid, const QString &version); bool hasUid(const QString &uid) const; + /* VersionListPtr getList(const QString &uid) const; VersionListPtr getListGuaranteed(const QString &uid) const; + */ QVector lists() const { return m_lists; } public: // for usage by parsers only void merge(const BaseEntity::Ptr &other) override; + void parse(const QJsonObject &obj) override; private: QVector m_lists; -- cgit v1.2.3