aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/flame/FlameModIndex.cpp
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-01-23 23:58:52 +0100
committerGitHub <noreply@github.com>2023-01-23 23:58:52 +0100
commit16477a8f6c1fc646208b41b76598ce8e7a60369e (patch)
tree782055d4c36affd2b9bd84905805c94f04134590 /launcher/modplatform/flame/FlameModIndex.cpp
parent04e4900415aa102f3ad2f40375e3b59bfc7ee9ba (diff)
parentea5020e188d7cb6d4c8dcf7f953161759ed17899 (diff)
downloadPrismLauncher-16477a8f6c1fc646208b41b76598ce8e7a60369e.tar.gz
PrismLauncher-16477a8f6c1fc646208b41b76598ce8e7a60369e.tar.bz2
PrismLauncher-16477a8f6c1fc646208b41b76598ce8e7a60369e.zip
Merge pull request #675 from flowln/generalize_mod_model
Diffstat (limited to 'launcher/modplatform/flame/FlameModIndex.cpp')
-rw-r--r--launcher/modplatform/flame/FlameModIndex.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/launcher/modplatform/flame/FlameModIndex.cpp b/launcher/modplatform/flame/FlameModIndex.cpp
index 32aa4bdb..7498e830 100644
--- a/launcher/modplatform/flame/FlameModIndex.cpp
+++ b/launcher/modplatform/flame/FlameModIndex.cpp
@@ -11,7 +11,7 @@ static ModPlatform::ProviderCapabilities ProviderCaps;
void FlameMod::loadIndexedPack(ModPlatform::IndexedPack& pack, QJsonObject& obj)
{
pack.addonId = Json::requireInteger(obj, "id");
- pack.provider = ModPlatform::Provider::FLAME;
+ pack.provider = ModPlatform::ResourceProvider::FLAME;
pack.name = Json::requireString(obj, "name");
pack.slug = Json::requireString(obj, "slug");
pack.websiteUrl = Json::ensureString(Json::ensureObject(obj, "links"), "websiteUrl", "");
@@ -76,10 +76,10 @@ static QString enumToString(int hash_algorithm)
void FlameMod::loadIndexedPackVersions(ModPlatform::IndexedPack& pack,
QJsonArray& arr,
const shared_qobject_ptr<QNetworkAccessManager>& network,
- BaseInstance* inst)
+ const BaseInstance* inst)
{
QVector<ModPlatform::IndexedVersion> unsortedVersions;
- auto profile = (dynamic_cast<MinecraftInstance*>(inst))->getPackProfile();
+ auto profile = (dynamic_cast<const MinecraftInstance*>(inst))->getPackProfile();
QString mcVersion = profile->getComponentVersion("net.minecraft");
for (auto versionIter : arr) {
@@ -127,7 +127,7 @@ auto FlameMod::loadIndexedPackVersion(QJsonObject& obj, bool load_changelog) ->
auto hash_list = Json::ensureArray(obj, "hashes");
for (auto h : hash_list) {
auto hash_entry = Json::ensureObject(h);
- auto hash_types = ProviderCaps.hashType(ModPlatform::Provider::FLAME);
+ auto hash_types = ProviderCaps.hashType(ModPlatform::ResourceProvider::FLAME);
auto hash_algo = enumToString(Json::ensureInteger(hash_entry, "algo", 1, "algorithm"));
if (hash_types.contains(hash_algo)) {
file.hash = Json::requireString(hash_entry, "value");