| 102 | } |
| 103 | |
| 104 | void ListModel::requestModVersions(ModPlatform::IndexedPack const& current, QModelIndex index) |
| 105 | { |
| 106 | auto profile = (dynamic_cast<MinecraftInstance*>((dynamic_cast<ModPage*>(parent()))->m_instance))->getPackProfile(); |
| 107 | |
| 108 | m_parent->apiProvider()->getVersions({ current.addonId.toString(), getMineVersions(), profile->getModLoaders() }, |
| 109 | [this, current, index](QJsonDocument& doc, QString addonId) { |
| 110 | if (!s_running.constFind(this).value()) |
| 111 | return; |
| 112 | versionRequestSucceeded(doc, addonId, index); |
| 113 | }); |
| 114 | } |
| 115 | |
| 116 | void ListModel::performPaginatedSearch() |
| 117 | { |
no test coverage detected