diff options
author | flow <thiagodonato300@gmail.com> | 2022-03-07 19:29:59 -0300 |
---|---|---|
committer | flow <thiagodonato300@gmail.com> | 2022-03-07 19:32:28 -0300 |
commit | 9c57b54a81a9026aa86a983a203df17c023eaa8d (patch) | |
tree | ea152742e106b92903acf083d598897243816b11 /launcher/ui/pages/modplatform/flame/FlameModModel.cpp | |
parent | b131d3b2ecbe6a9be35088d8411927bcd30de896 (diff) | |
download | PrismLauncher-9c57b54a81a9026aa86a983a203df17c023eaa8d.tar.gz PrismLauncher-9c57b54a81a9026aa86a983a203df17c023eaa8d.tar.bz2 PrismLauncher-9c57b54a81a9026aa86a983a203df17c023eaa8d.zip |
refactor: move things around so that related things are close together
This also adds some comments around ModModel.cpp and ModPage.cpp to add
some ease of reading the code.
Also move some things from headers to cpp files.
Diffstat (limited to 'launcher/ui/pages/modplatform/flame/FlameModModel.cpp')
-rw-r--r-- | launcher/ui/pages/modplatform/flame/FlameModModel.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/launcher/ui/pages/modplatform/flame/FlameModModel.cpp b/launcher/ui/pages/modplatform/flame/FlameModModel.cpp index 7588a714..ce2f74f1 100644 --- a/launcher/ui/pages/modplatform/flame/FlameModModel.cpp +++ b/launcher/ui/pages/modplatform/flame/FlameModModel.cpp @@ -1,7 +1,24 @@ #include "FlameModModel.h" +#include "modplatform/flame/FlameModIndex.h" + namespace FlameMod { const char* ListModel::sorts[6]{ "Featured", "Popularity", "LastUpdated", "Name", "Author", "TotalDownloads" }; +void ListModel::loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj) +{ + FlameMod::loadIndexedPack(m, obj); +}; + +void ListModel::loadIndexedPackVersions(ModPlatform::IndexedPack& m, QJsonArray& arr) +{ + FlameMod::loadIndexedPackVersions(m, arr, APPLICATION->network(), m_parent->m_instance); +}; + +QJsonArray ListModel::documentToArray(QJsonDocument& obj) const +{ + return obj.array(); +} + } // namespace FlameMod |