refactor: use function cb instead of class cb in getVersions

I've discovered even more functional programming! :^)

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-07-18 19:22:31 -03:00
parent 5bc67d3f6b
commit 6f052baa94
4 changed files with 10 additions and 9 deletions

View File

@ -100,7 +100,8 @@ void ListModel::requestModVersions(ModPlatform::IndexedPack const& current)
{
auto profile = (dynamic_cast<MinecraftInstance*>((dynamic_cast<ModPage*>(parent()))->m_instance))->getPackProfile();
m_parent->apiProvider()->getVersions(this, { current.addonId.toString(), getMineVersions(), profile->getModLoaders() });
m_parent->apiProvider()->getVersions({ current.addonId.toString(), getMineVersions(), profile->getModLoaders() },
[this, current](QJsonDocument& doc, QString addonId) { versionRequestSucceeded(doc, addonId); });
}
void ListModel::performPaginatedSearch()