diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-10-09 00:24:14 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-10-09 00:24:14 +0200 |
commit | 36edf6cbc6f0b329e0b8f96dc5543cff0acb8aec (patch) | |
tree | ad127020649817ef6203fbea22d3eff954b5b110 /logic/Mod.cpp | |
parent | 05e2da51d8d25374140dce3c1646a2a1a0a2a553 (diff) | |
parent | 9edc486f137c9719bd62c8c63ecc3d195f9dc79e (diff) | |
download | MultiMC-36edf6cbc6f0b329e0b8f96dc5543cff0acb8aec.tar MultiMC-36edf6cbc6f0b329e0b8f96dc5543cff0acb8aec.tar.gz MultiMC-36edf6cbc6f0b329e0b8f96dc5543cff0acb8aec.tar.lz MultiMC-36edf6cbc6f0b329e0b8f96dc5543cff0acb8aec.tar.xz MultiMC-36edf6cbc6f0b329e0b8f96dc5543cff0acb8aec.zip |
Merge branch 'feature_mcmod_info' into develop
Diffstat (limited to 'logic/Mod.cpp')
-rw-r--r-- | logic/Mod.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/logic/Mod.cpp b/logic/Mod.cpp index 825e663f..c45e3ad2 100644 --- a/logic/Mod.cpp +++ b/logic/Mod.cpp @@ -119,6 +119,18 @@ void Mod::ReadMCModInfo(QByteArray contents) m_name = firstObj.value("name").toString(); m_version = firstObj.value("version").toString(); m_homeurl = firstObj.value("url").toString(); + m_description = firstObj.value("description").toString(); + QJsonArray authors = firstObj.value("authors").toArray(); + if(authors.size() == 0) m_authors = ""; + else if(authors.size() >= 1) + { + m_authors = authors.at(0).toString(); + for(int i = 1; i < authors.size(); i++) + { + m_authors += ", " + authors.at(i).toString(); + } + } + m_credits = firstObj.value("credits").toString(); return; } ; |