diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-03-17 01:48:54 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-04-07 00:20:01 +0200 |
commit | 0060b506257b906d40ef53d1e23404dba76afcee (patch) | |
tree | 19060c5a8d6525bbed6a91afa249a17e678e37fa /api/logic/meta/Version.cpp | |
parent | 40cf38bc3225c614e7e81d074f890e6f9da0507b (diff) | |
download | MultiMC-0060b506257b906d40ef53d1e23404dba76afcee.tar MultiMC-0060b506257b906d40ef53d1e23404dba76afcee.tar.gz MultiMC-0060b506257b906d40ef53d1e23404dba76afcee.tar.lz MultiMC-0060b506257b906d40ef53d1e23404dba76afcee.tar.xz MultiMC-0060b506257b906d40ef53d1e23404dba76afcee.zip |
NOISSUE simplify.
Diffstat (limited to 'api/logic/meta/Version.cpp')
-rw-r--r-- | api/logic/meta/Version.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/api/logic/meta/Version.cpp b/api/logic/meta/Version.cpp index 039f4fef..b79c178a 100644 --- a/api/logic/meta/Version.cpp +++ b/api/logic/meta/Version.cpp @@ -48,11 +48,16 @@ QDateTime Version::time() const std::unique_ptr<Task> Version::remoteUpdateTask() { - return std::unique_ptr<VersionRemoteLoadTask>(new VersionRemoteLoadTask(this, this)); + return std::unique_ptr<RemoteLoadTask>(new RemoteLoadTask(this)); } std::unique_ptr<Task> Version::localUpdateTask() { - return std::unique_ptr<VersionLocalLoadTask>(new VersionLocalLoadTask(this, this)); + return std::unique_ptr<LocalLoadTask>(new LocalLoadTask(this)); +} + +void Version::parse(const QJsonObject& obj) +{ + parseVersion(obj, this); } void Version::merge(const std::shared_ptr<BaseEntity> &other) @@ -78,10 +83,6 @@ QString Version::localFilename() const { return m_uid + '/' + m_version + ".json"; } -QJsonObject Version::serialized() const -{ - return Format::serializeVersion(this); -} void Version::setType(const QString &type) { |