De-OOP ProviderCapabilities

There was no reason for it to be a class, and imo it created quite a code-smell needing to initialise it everywhere.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2024-01-26 03:01:02 +00:00
parent 97ee0a19b5
commit 82d0f204e2
11 changed files with 20 additions and 38 deletions

View File

@ -13,7 +13,6 @@
#include "minecraft/mod/ModFolderModel.h"
static ModrinthAPI api;
static ModPlatform::ProviderCapabilities ProviderCaps;
bool ModrinthCheckUpdate::abort()
{
@ -36,7 +35,7 @@ void ModrinthCheckUpdate::executeTask()
// Create all hashes
QStringList hashes;
auto best_hash_type = ProviderCaps.hashType(ModPlatform::ResourceProvider::MODRINTH).first();
auto best_hash_type = ModPlatform::ProviderCapabilities::hashType(ModPlatform::ResourceProvider::MODRINTH).first();
ConcurrentTask hashing_task(this, "MakeModrinthHashesTask", APPLICATION->settings()->get("NumberOfConcurrentTasks").toInt());
for (auto* resource : m_resources) {