diff options
Diffstat (limited to 'api/logic/meta/VersionList.cpp')
-rw-r--r-- | api/logic/meta/VersionList.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/api/logic/meta/VersionList.cpp b/api/logic/meta/VersionList.cpp index aab3e0f7..7196d4be 100644 --- a/api/logic/meta/VersionList.cpp +++ b/api/logic/meta/VersionList.cpp @@ -169,21 +169,17 @@ QHash<int, QByteArray> VersionList::roleNames() const std::unique_ptr<Task> VersionList::remoteUpdateTask() { - return std::unique_ptr<VersionListRemoteLoadTask>(new VersionListRemoteLoadTask(this, this)); + return std::unique_ptr<RemoteLoadTask>(new RemoteLoadTask(this)); } std::unique_ptr<Task> VersionList::localUpdateTask() { - return std::unique_ptr<VersionListLocalLoadTask>(new VersionListLocalLoadTask(this, this)); + return std::unique_ptr<LocalLoadTask>(new LocalLoadTask(this)); } QString VersionList::localFilename() const { return m_uid + "/index.json"; } -QJsonObject VersionList::serialized() const -{ - return Format::serializeVersionList(this); -} QString VersionList::humanReadable() const { @@ -224,6 +220,11 @@ void VersionList::setVersions(const QVector<VersionPtr> &versions) endResetModel(); } +void VersionList::parse(const QJsonObject& obj) +{ + parseVersionList(obj, this); +} + void VersionList::merge(const BaseEntity::Ptr &other) { const VersionListPtr list = std::dynamic_pointer_cast<VersionList>(other); @@ -285,4 +286,5 @@ BaseVersionPtr VersionList::getRecommended() const } + #include "VersionList.moc" |