MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / onMetadataFailed

Method onMetadataFailed

launcher/ui/dialogs/ModUpdateDialog.cpp:332–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332void ModUpdateDialog::onMetadataFailed(Mod* mod, bool try_others, ModPlatform::Provider first_choice)
333{
334 if (try_others) {
335 auto index_dir = indexDir();
336
337 auto* task = new EnsureMetadataTask(mod, index_dir, next(first_choice));
338 connect(task, &EnsureMetadataTask::metadataReady, [this](Mod* candidate) { onMetadataEnsured(candidate); });
339 connect(task, &EnsureMetadataTask::metadataFailed, [this](Mod* candidate) { onMetadataFailed(candidate, false); });
340
341 m_second_try_metadata->addTask(task);
342 } else {
343 QString reason{ tr("Couldn't find a valid version on the selected mod provider(s)") };
344
345 m_failed_metadata.append({mod, reason});
346 }
347}
348
349void ModUpdateDialog::appendMod(CheckUpdateTask::UpdatableMod const& info)
350{

Callers

nothing calls this directly

Calls 3

nextFunction · 0.85
addTaskMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected