diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-03-27 03:34:39 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-04-07 00:20:02 +0200 |
commit | 5fabb4f2546fa6b79a4e2c29679f506e587a0070 (patch) | |
tree | fabccd987452ce98a6b80cad96a5d19c2d24be46 /api/logic/meta | |
parent | 6f2a87167a13101d80d2fbc096bbb6a5eb5ab0c9 (diff) | |
download | MultiMC-5fabb4f2546fa6b79a4e2c29679f506e587a0070.tar MultiMC-5fabb4f2546fa6b79a4e2c29679f506e587a0070.tar.gz MultiMC-5fabb4f2546fa6b79a4e2c29679f506e587a0070.tar.lz MultiMC-5fabb4f2546fa6b79a4e2c29679f506e587a0070.tar.xz MultiMC-5fabb4f2546fa6b79a4e2c29679f506e587a0070.zip |
NOISSUE Rough refactor of ProfilePatch and VersionFile internals.
They are now distinct classes with distinct responsibilities.
* ProfilePatch is an entry in MinecraftProfile and can hold VersionFile or Meta::Version.
* VersionFile is the basic element that holds version information loaded from JSON.
* Meta::Version is the loader class for VersionFile(s) from a server.
Diffstat (limited to 'api/logic/meta')
-rw-r--r-- | api/logic/meta/Version.cpp | 2 | ||||
-rw-r--r-- | api/logic/meta/VersionList.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/api/logic/meta/Version.cpp b/api/logic/meta/Version.cpp index af9d4f10..2a8e1780 100644 --- a/api/logic/meta/Version.cpp +++ b/api/logic/meta/Version.cpp @@ -32,7 +32,7 @@ QString Meta::Version::descriptor() QString Meta::Version::name() { if(m_data) - return m_data->getName(); + return m_data->name; return m_uid; } QString Meta::Version::typeString() const diff --git a/api/logic/meta/VersionList.cpp b/api/logic/meta/VersionList.cpp index c2712155..41ed1352 100644 --- a/api/logic/meta/VersionList.cpp +++ b/api/logic/meta/VersionList.cpp @@ -73,7 +73,7 @@ QVariant VersionList::data(const QModelIndex &index, int role) const case VersionRole: case VersionIdRole: return version->version(); - case ParentGameVersionRole: + case ParentVersionRole: { auto parentUid = this->parentUid(); if(parentUid.isEmpty()) @@ -102,7 +102,7 @@ QVariant VersionList::data(const QModelIndex &index, int role) const BaseVersionList::RoleList VersionList::providesRoles() const { - return {VersionPointerRole, VersionRole, VersionIdRole, ParentGameVersionRole, + return {VersionPointerRole, VersionRole, VersionIdRole, ParentVersionRole, TypeRole, UidRole, TimeRole, RequiresRole, SortRole, RecommendedRole, LatestRole, VersionPtrRole}; } |