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.
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "ModrinthPage.h"
|
||||
#include "modplatform/modrinth/ModrinthPackIndex.h"
|
||||
|
||||
namespace Modrinth {
|
||||
|
||||
@ -13,12 +12,13 @@ class ListModel : public ModPlatform::ListModel {
|
||||
virtual ~ListModel() = default;
|
||||
|
||||
private:
|
||||
void loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj) override { Modrinth::loadIndexedPack(m, obj); };
|
||||
|
||||
QJsonArray documentToArray(QJsonDocument& obj) const override { return obj.object().value("hits").toArray(); };
|
||||
void loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
|
||||
void loadIndexedPackVersions(ModPlatform::IndexedPack& m, QJsonArray& arr) override;
|
||||
|
||||
QJsonArray documentToArray(QJsonDocument& obj) const override;
|
||||
|
||||
static const char* sorts[5];
|
||||
const char** getSorts() const override { return sorts; };
|
||||
inline const char** getSorts() const override { return sorts; };
|
||||
};
|
||||
|
||||
} // namespace Modrinth
|
||||
|
Reference in New Issue
Block a user