MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / deleteModMetadata

Method deleteModMetadata

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

Source from the content-addressed store, hash-verified

301}
302
303void ModFolderPage::deleteModMetadata()
304{
305 auto selection = m_filterModel->mapSelectionToSource(ui->treeView->selectionModel()->selection()).indexes();
306 auto selectionCount = m_model->selectedMods(selection).length();
307 if (selectionCount == 0)
308 return;
309 if (selectionCount > 1) {
310 auto response = CustomMessageBox::selectable(this, tr("Confirm Removal"),
311 tr("You are about to remove the metadata for %1 mods.\n"
312 "Are you sure?")
313 .arg(selectionCount),
314 QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No)
315 ->exec();
316
317 if (response != QMessageBox::Yes)
318 return;
319 }
320
321 m_model->deleteMetadata(selection);
322}
323
324void ModFolderPage::changeModVersion()
325{

Callers

nothing calls this directly

Calls 3

selectableFunction · 0.85
deleteMetadataMethod · 0.80
execMethod · 0.45

Tested by

no test coverage detected