diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2016-04-06 23:09:30 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-04-30 23:59:23 +0200 |
commit | 00e5968bd28ab1df33b3a39dbac8cda99aa2a0d2 (patch) | |
tree | c930ca4f0edae9bb2bbd1a9ce2fddb2ca5a7bf32 /logic/BaseVersionList.cpp | |
parent | 5ae3b2c11416eb897a08b0d9531843d0357332f8 (diff) | |
download | MultiMC-00e5968bd28ab1df33b3a39dbac8cda99aa2a0d2.tar MultiMC-00e5968bd28ab1df33b3a39dbac8cda99aa2a0d2.tar.gz MultiMC-00e5968bd28ab1df33b3a39dbac8cda99aa2a0d2.tar.lz MultiMC-00e5968bd28ab1df33b3a39dbac8cda99aa2a0d2.tar.xz MultiMC-00e5968bd28ab1df33b3a39dbac8cda99aa2a0d2.zip |
NOISSUE Add a skeleton of the wonko system
Diffstat (limited to 'logic/BaseVersionList.cpp')
-rw-r--r-- | logic/BaseVersionList.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/logic/BaseVersionList.cpp b/logic/BaseVersionList.cpp index 73f4a7ef..b34f318c 100644 --- a/logic/BaseVersionList.cpp +++ b/logic/BaseVersionList.cpp @@ -72,7 +72,7 @@ QVariant BaseVersionList::data(const QModelIndex &index, int role) const } } -BaseVersionList::RoleList BaseVersionList::providesRoles() +BaseVersionList::RoleList BaseVersionList::providesRoles() const { return {VersionPointerRole, VersionRole, VersionIdRole, TypeRole}; } @@ -87,3 +87,18 @@ int BaseVersionList::columnCount(const QModelIndex &parent) const { return 1; } + +QHash<int, QByteArray> BaseVersionList::roleNames() const +{ + QHash<int, QByteArray> roles = QAbstractListModel::roleNames(); + roles.insert(VersionRole, "version"); + roles.insert(VersionIdRole, "versionId"); + roles.insert(ParentGameVersionRole, "parentGameVersion"); + roles.insert(RecommendedRole, "recommended"); + roles.insert(LatestRole, "latest"); + roles.insert(TypeRole, "type"); + roles.insert(BranchRole, "branch"); + roles.insert(PathRole, "path"); + roles.insert(ArchitectureRole, "architecture"); + return roles; +} |