MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / deleteModMetadata

Method deleteModMetadata

launcher/ui/pages/instance/ModFolderPage.cpp:383–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381}
382
383void ModFolderPage::deleteModMetadata()
384{
385 auto selection = m_filterModel->mapSelectionToSource(ui->treeView->selectionModel()->selection()).indexes();
386 auto selectionCount = m_model->selectedMods(selection).length();
387 if (selectionCount == 0)
388 return;
389 if (selectionCount > 1) {
390 auto response = CustomMessageBox::selectable(this, tr("Confirm Removal"),
391 tr("You are about to remove the metadata for %1 mods.\n"
392 "Are you sure?")
393 .arg(selectionCount),
394 QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No)
395 ->exec();
396
397 if (response != QMessageBox::Yes)
398 return;
399 }
400
401 m_model->deleteModsMetadata(selection);
402}
403
404void ModFolderPage::changeModVersion()
405{

Callers

nothing calls this directly

Calls 4

selectableFunction · 0.85
selectedModsMethod · 0.80
deleteModsMetadataMethod · 0.80
execMethod · 0.45

Tested by

no test coverage detected