diff options
Diffstat (limited to 'launcher/meta/Index.h')
-rw-r--r-- | launcher/meta/Index.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/launcher/meta/Index.h b/launcher/meta/Index.h index d33ab0c8..06ea09dc 100644 --- a/launcher/meta/Index.h +++ b/launcher/meta/Index.h @@ -19,20 +19,19 @@ #include <memory> #include "BaseEntity.h" +#include "meta/VersionList.h" class Task; namespace Meta { -using VersionListPtr = std::shared_ptr<class VersionList>; -using VersionPtr = std::shared_ptr<class Version>; class Index : public QAbstractListModel, public BaseEntity { Q_OBJECT public: explicit Index(QObject *parent = nullptr); - explicit Index(const QVector<VersionListPtr> &lists, QObject *parent = nullptr); + explicit Index(const QVector<VersionList::Ptr> &lists, QObject *parent = nullptr); enum { @@ -49,21 +48,21 @@ public: QString localFilename() const override { return "index.json"; } // queries - VersionListPtr get(const QString &uid); - VersionPtr get(const QString &uid, const QString &version); + VersionList::Ptr get(const QString &uid); + Version::Ptr get(const QString &uid, const QString &version); bool hasUid(const QString &uid) const; - QVector<VersionListPtr> lists() const { return m_lists; } + QVector<VersionList::Ptr> lists() const { return m_lists; } public: // for usage by parsers only void merge(const std::shared_ptr<Index> &other); void parse(const QJsonObject &obj) override; private: - QVector<VersionListPtr> m_lists; - QHash<QString, VersionListPtr> m_uids; + QVector<VersionList::Ptr> m_lists; + QHash<QString, VersionList::Ptr> m_uids; - void connectVersionList(const int row, const VersionListPtr &list); + void connectVersionList(const int row, const VersionList::Ptr &list); }; } |